Sunday, March 24, 2019

IsEmpty or IsBlank function like ISNULL in SQL Server?

Try below in select clause.
select ISNULL( nullif(EmptyOrNullOrBlankColumn,'' ),NULL)
Below in Where Clause.
where ISNULL( nullif(EmptyOrNullOrBlankColumn,'' ),NULL) is not null

No comments:

Post a Comment

Recently Executed queries

 SELECT     txt.TEXT AS [SQL Statement],     qs.EXECUTION_COUNT [No. Times Executed],     qs.LAST_EXECUTION_TIME AS [Last Time Executed],   ...