enquires@blushmedia.co.uk
 

CASE WHEN THEN ELSE END

Menu

Today I was trying to use a simple replace function on a date column but found this was converting it to a varchar. I therefore decided to use the following CASE function which had the desired results.

CASE WHEN column = ’XXX’ THEN ’YYY’ 
ELSE column 
END AS [Column header]