Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exception Query Between Two Tables?

Status
Not open for further replies.

BTilson

Programmer
Jul 14, 2004
139
US
I have two tables, Part and Vendor_Quote. Each table has a unique part identifier. I need to create a query that will show me records in Part that DO NOT have a corresponding record in Vendor_Quote.

I know this is doable, but my mind is drawing a blank. How would I go about setting up such a query?

Any help will be greatly appreciated.

Thanks!

Brooks Tilson
Database Development
Tilson Machine, Inc.
 
You want a left join, with a null filter on the right side (ie you only want to show rows from left table without corresponding record on right table)

Code:
select Part.*
from Part 
left join 
Vendor_Quote
on Part.Unique_Part_Identifier = Vendor_Quote.Unique_Part_Identifier
where Vendor_Quote.Unique_Part_Identifier is null

Hope this helps,

Alex

Ignorance of certain subjects is a great part of wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top