Link to home
Create AccountLog in
Avatar of JElster
JElsterFlag for United States of America

asked on

Help with simple query

I have Customer table with Customer ID and Cust Name and other fields.

I have another Customer table Customer2

I need to find all the records in Customer2 that are not in Customer based on Customer ID and  Cust Name.
Ids may exist in both Names may be differant

I tried, but doesn't seem to work

SELECT * FROM CUSTOMER2 WHERE CUSTID NOT IN (SELECT CUSTID FROM CUSTOMER) AND
CUSTNAME NOT IN (SELECT CUSTNAME FROM CUSTOMER)
ASKER CERTIFIED SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account