duda (11/9/2009)
Nice one, Noticed that when you use your case statement as per below then you get the "Date is Null" results as you do not have your else statement.SELEC[T] CASE
WHEN CONVERT(CHAR(10),@MyDate,101) IS NULL THEN 'Date is Null'
END AS MyDate
True, but you don't get the date when @MyDate is not null either.
All of the queries are examples of trying to return @MyDate when it's not null, and "Date is Null" otherwise.