Monday, August 26, 2013

How to check if a string is null or empty (length 0) sql server

First convert empty value to null using "nullif" then use "isnull" to switch
SELECT Isnull(NULLIF(string1, ''), string2) AS String .......

No comments:

Post a Comment