I am looking for an SQL query to select all records not selected by another query on the same table. Specifically I want to select all records which have duplicates of a pa
If you change your not IN sub SELECT statement to only return one column (ID), it should work -
http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/