NOT IN Confusion

  • Comments posted to this topic are about the item NOT IN Confusion

  • Not Exists vs Not In:

    SELECT *

    FROM dbo.Candidates AS c

    WHERE

    NOT exists

    ( SELECT PersonName FROM dbo.Person WHERE Person.PersonName = c.PersonName);

  • Compare and contrast "EXCEPT".

     

  • Always an issue of ansi_nulls setting... if run with "set ansi_nulls off", you'll get different output 🙂

  • My preference is to use isnull( PersonName, '' ); even all the way back to the initial table load.  Sloppy input and weak specifications.  (BTW, I have met a man whose last name really is "Null.")

  • My preference is to use isnull( PersonName, '' ); even all the way back to the initial table load.  Sloppy input and weak specifications.  (BTW, I have met a man whose last name really is "Null.")

    Thanks to SQLServerCentral for this poser.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply