Make a "inner join on x=Y" or make "select ..... where x not in (select y)"
Unless I'm missing something, those will not return the same result.
Table1 INNER JOIN Table2 ON X = y
WHERE Table1.X IN (SELECT Y from Table2)
are equivalent, but INNER JOIN and NOT IN do not do the same thing.
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass