Link to home
Start Free TrialLog in
Avatar of Jay Williams
Jay Williams

asked on

In Access 2010 How can I find records in one table that have no exact match in another table?

I need to find records that do not match by multiple fields.  What's a good strategy, or is there some generic SQL statements that might give me a clue?
Avatar of Kelvin Sparks
Kelvin Sparks
Flag of New Zealand image

SELECT a.*
FROM a LEFT JOIN b ON
b.primarykey = a.primarykey
WHERE a.primarykey is not null and b.primarykey is null

Will give you all records in a that don't have a match in b.

Kelvin
Avatar of Jay Williams
Jay Williams

ASKER

Thanks, Kevin.  I'll give it a whirl.
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
One of the query wizard options is a "Find Unmatched" query, which will walk you through the steps of identifying which field(s) you want to match on, and will allow you to select other fields from the table as well.
Thanks again, Rey.  That's what I have in mind.  I'll let you know. :-)
This is pure gold--and so are you.