Finding the excluded records in access
If I have
tblOne with column [Social]
with value 1,2,3,4,5,6,7,8,9,10
and...
tblTwo with column [social]
with value 1,2,3,4,9,10,11,12,13,14
How can I make a querie so that it looks at the two tables and returns the fields in tblOne that are not represented in tblTwo.
giving me the results 5,6,7,8
Many thanks to anyone who can help me get over this hurdle. ~Bryan
Re: Finding the excluded records in access
Hi,
Just use the concept of subquery....Here is the equivalent SQL Statement to retrieve your desired results..This sql statement works fine..Attach this in your query design view...Let me know...
Quote:
Select Social from tblOne where Social not in (Select Social from tblTwo);
Greg
:) :) :)
Re: Finding the excluded records in access
OR you can use an OUTER JOIN statement and look for NULL values in the 2nd table.
Code:
SELECT T1.social
FROM tblOne T1
LEFT OUTER JOIN
tblTwo T2
ON T1.social = T2.social
WHERE T2.social IS NULL