CASE
WHEN EETERMDATE IS NULL THEN ' '
ELSE CONVERT(CHAR(10),EETERMDATE,101)
END as TerminationDate, --(28)
In the statement above the following if statement is coded
if eetermdate is null then blanks
else convert eetermdate to a date format
What if I wanted to code the following if statement
if status is terminated
if eetermdate is null then blanks
else convert eetermdate to a date format
else terminate field should be blank not nulls.
Is it possible to do it in ms-sql using the case statement?
Any ideas are welcome.
Thanks.
WHEN EETERMDATE IS NULL THEN ' '
ELSE CONVERT(CHAR(10),EETERMDATE,101)
END as TerminationDate, --(28)
In the statement above the following if statement is coded
if eetermdate is null then blanks
else convert eetermdate to a date format
What if I wanted to code the following if statement
if status is terminated
if eetermdate is null then blanks
else convert eetermdate to a date format
else terminate field should be blank not nulls.
Is it possible to do it in ms-sql using the case statement?
Any ideas are welcome.
Thanks.