Find records not in both tables?

  • Thread starter Thread starter Jay
  • Start date Start date
J

Jay

HI...Let's say I have 2 tables, tblRangesA and tblRangesB, each with
just one field 'RangeName'.

I know tblRangesA contains 5,110 distinct values, and tblRangesB has 6,008.

How do I construct one query, based on both tables linked on 'RangeName,
which will return the 890 values which are in A but not in B?

Any help greatly appreciated....Regards, Jason
 
Never mind, I've figured it out...

SELECT DISTINCT tblRangesB.Range
FROM tblRangesB
LEFT JOIN tblRangesA ON tblRangesB.Range = tblRangesA.Range
WHERE (((tblRangesA.Range) Is Null));
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top