By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,756 Members | 1,195 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,756 IT Pros & Developers. It's quick & easy.

Getting non matching records from 2 tables?

P: 1
If you have:

TBL1
field1 field2
a1-1 a1-2
a2-2 a2-2

&

TBL2
field1 field2
b1-1 b1-2
a2-2 a2-2

I want t get records from TBL2 that do not match in TBL1.field1 or TBL2.field1?
In this case i would get b1-1 from TBL2

Thanks all
Sep 6 '06 #1
Share this Question
Share on Google+
1 Reply


P: 3
SELECT Field1
FROM Table2
WHERE (NOT (Field1 IN
(SELECT Field1
FROM Table1)))
Sep 6 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.