DigitalBard
08-20-2008, 09:03 PM
I have never had to write a query (until now) that finds all of the values stored in one table that are not in another.
For example, I need to find all of the usernames in Table1 that do not exist in Table2. In ASP, I cheat and check in a DO/LOOP, but I have to do this in a query instead and I'm not sure how to go about it.
When I test for "tbl1.username <> tbl2.username" in the WHERE clause I'm not getting the correct results.
Can someone point me in the right direction?
For example, I need to find all of the usernames in Table1 that do not exist in Table2. In ASP, I cheat and check in a DO/LOOP, but I have to do this in a query instead and I'm not sure how to go about it.
When I test for "tbl1.username <> tbl2.username" in the WHERE clause I'm not getting the correct results.
Can someone point me in the right direction?