Feeds:
Posts
Comments

Archive for February, 2011

Assume a table with Col_1 and Col_2 and we want to test Col_1 for
null and empty values ,

if value exist in this column then select this column otherwise select
Col_2

 

SELECT
VALUE =CASE WHEN LEN(ISNULL(Col_1,))=0 THEN Col_2

WHEN
LEN(ISNULL(Col_1,))!=0 THEN Col_1

END

FROM
Table_Name 

 

Read Full Post »

%d bloggers like this: