Monday, July 23, 2018

SQL script to compare what is NOT IN...






SELECT COUNT(*)


FROM dbo.ssFields


WHERE field7='legal'


AND  ArchiveID =  '1' --Travel Agency


AND (Field1) NOT IN(


       SELECT (Field1) AS CompareString


       FROM dbo.ssFields


       WHERE field7='legal'


       AND  ArchiveID =  '8' --Travel Agency - Date Fix


)

No comments:

Post a Comment