Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > SQL Language
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old December 5th, 2004, 12:13 AM
Authorized User
Join Date: Dec 2004
Location: Bakersfield, CA, USA.
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Outer Join, 2 columns

Do I understand correctly that outer joins are used when only one column uniquely identifies rows? I have seen other posts on this forum and others on outer joins, but those posts address a situation where only one column uniquely identifies each row.

I need to copy all rows from tblA that are not in tblB, into tblB.
TblA and TblB have same structure.
Rows are made unique by two columns: DateTime, ID

Reply With Quote
  #2 (permalink)  
Old December 5th, 2004, 03:14 AM
Friend of Wrox
Join Date: Nov 2003
Location: Lehigh Acres, FL, USA.
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc

try something like this

SET TblA.Col1 =tblB.col1
WHERE NOT EXISTS (select ID from tblB WHERE TblB.id = TblA.id and tbla.datetime=tblb.datetime)

Jaime E. Maccou
Applications Analyst
Database Programmer
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't figure out an OUTER JOIN statement dhsmd SQL Language 5 September 18th, 2008 01:02 AM
Non-ANSI outer join operators Jeff Kanning SQL Server 2005 14 September 9th, 2008 08:02 PM
left outer join keyvanjan Classic ASP Basics 1 April 15th, 2006 05:37 AM
left outer join keyvanjan Classic ASP Professional 0 February 5th, 2006 10:54 AM
outer join on same table roog SQL Language 4 September 30th, 2004 05:31 AM

All times are GMT -4. The time now is 02:06 AM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.