Home Forums SQL Server 2008 T-SQL (SS2K8) what are all the possible values that a blank field in a sql server table could be? RE: what are all the possible values that a blank field in a sql server table could be?

  • Thank you. By combining ISNULL and NULLIF functions it's the most elegant handling of the true NULL and text NULL scenario I've seen. Few months back I was doing it using AND, which made for very long statement. This is better.

    WHEN ISNULL(NULLIF(realname, 'NULL'), '') = '' AND ISNULL(NULLIF(computer_name, 'NULL'), '') = '' then email

    --Quote me