String.IsNullOrEmpty() for T-SQL

Filing this under nifty things I don’t want to forget.

The T-SQL equivalent of C#’s, String.IsNullOrEmpty():

ISNULL( RTRIM(LTRIM ([ColumnName])),'') <> ''

Thanks to Greg Westendorf for sharing this nugget with me.

Leave a Reply