Seidel1


I am trying to display results in which a value in my first result table is NOT contained in the second result table. Any idea on how to do this .

SELECT CUSTOMERID, CUSTOMER FROM TABLE1

WHERE CUSTOMERID NOT IN TABLE2





Re: Checking for records where One value is NOT in the other?

Cam Bruce


Code Snippet

select c1.customerid, c1.customer

from table1 c1

left join table2 c2

on c1.customerid = c2.customerid

where c2.customerid is null






Re: Checking for records where One value is NOT in the other?

Jim Seidel

Excellent, thanks