Possible Duplicate:
SQL NOT IN not working
Hey All,
I have the following two queries:
select distinct ID from db2.tran tr
where ID not in(
select distinct id from db2.tran
join (select distinct id from db1.client) as c on c.id = tr.id)
select distinct id from db2.tran tr
where id not in (select distinct id from db1.client)
Now in my mind, these queries should be equivelant, however, the first one returns rows, and the second one does not. Am i going crazy or is thier logic behind why these two are not coming out the same.
Thanks