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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Left Join?

Status
Not open for further replies.
Feb 8, 2002
43
US
Using Access 2000
I am doing a left join between 2 tables.
I know that it will return everything on the left as well as everything that it matches with on the right.

HOWEVER, I want to do a left join that returns everything on the left BUT leave out all the records that match with the right.

How would I do this?
 
Select OneID, TwoID FROM tblOne LEFT JOIN tblTwo ON tblOne.OneID = tblTwo_OneID WHERE tblTwo_OneID Is Null

Is that what you're looking for? It will give you all the records in tblOne where there are no matching records in tblTwo. It's called an unmatched query.

Hope this helps.

Jeremy ==
Jeremy Wallace
AlphaBet City Dataworks
Affordable Development, Professionally Done

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top