Viewing 2 posts - 1 through 2 (of 2 total)
Yes, Kenneth's works but Ken McKelvey's (the one I quoted) doesnt
July 22, 2009 at 6:11 am
#1028235
Doesnt work when date1 is not null and date2 is null
Ken McKelvey (7/22/2009)CASEWHEN COALESCE(date2, 0) < COALESCE(date1, 0)THEN date2ELSE COALESCE(date1, date2)END
Ken McKelvey (7/22/2009)
CASEWHEN COALESCE(date2, 0) < COALESCE(date1, 0)THEN date2ELSE COALESCE(date1, date2)END
CASE
WHEN COALESCE(date2, 0) < COALESCE(date1, 0)
THEN date2
ELSE COALESCE(date1, date2)
END
WHEN @d1 < COALESCE(@d2,'20991231') THEN @d1
ELSE @d2
July 22, 2009 at 5:59 am
#1028221