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?

  • Sean Lange (10/22/2013)


    polkadot (10/22/2013)


    According to your rules neither of these is accurate. They will both allow columns with the string literal 'NULL'. If you are ok with ignoring rule #3 than I would do a slightly different version of (2).

    Case when ISNULL(realname, '') = '' AND ISNULL(computer_name, '') = '' then email

    To handle the word NULL, couldn't we do this?

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

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs