Help with OUTER JOIN

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

First, thanks to all the folks that post questions and responses - I always
learn something new here. Now its my turn - I've reviewed some of the
postings on OUTER JOIN but I'm not getting the syntax right. Here is my
example. I have two tables of part numbers:

TBL1_ALL PART NUMBERS - This table is a compilation and contains all part
numbers from all vendors

TBL2_VENDOR1 PART NUMBERS - This second table is a single vendors part
numbers (and some of the part numbers are in the first table).

....What I want to do is create an OUTER JOIN that will return the part
numbers that are in TBL2, but not in TBL1.

Please advise - your help is greatly appreciated.
 
Wil said:
First, thanks to all the folks that post questions and responses - I
always learn something new here. Now its my turn - I've reviewed
some of the postings on OUTER JOIN but I'm not getting the syntax
right. Here is my example. I have two tables of part numbers:

TBL1_ALL PART NUMBERS - This table is a compilation and contains all
part numbers from all vendors

TBL2_VENDOR1 PART NUMBERS - This second table is a single vendors part
numbers (and some of the part numbers are in the first table).

...What I want to do is create an OUTER JOIN that will return the part
numbers that are in TBL2, but not in TBL1.

Please advise - your help is greatly appreciated.

SELECT TBL2.PartNumber
FROM TBL2 LEFT OUTER JOIN TBL1
ON TBL2.PartNumber = TBL1.PartNumber
WHERE TBL1.PartNumber Is Null
 
Back
Top