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!

Selecting records with no match in second table

Status
Not open for further replies.

sevex

Programmer
Sep 18, 2001
74
CA
I've seen this done so many times, and now I can't remember how it's done.

I have two tables, linked with a common field, and I want to select everything from the first table that doesn't have any matching records in the second table.

A quick example would be greatly appreciated. Thanks in advance.
 
Left or Right outer join.

select name from table1
left outer join table2
on table1.key = table2.key
 
Or you could create a 'Find Unmatched' query. I find using the wizard makes it less confusing. Hope it helps :)
 
thanks for the help, but I gave up and took an easier path. just selected all of the records, matching and all, then used code to check for the unmatched ones.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top