Viewing 2 posts - 1 through 2 (of 2 total)
Because @MyStatusList is never NULL, the versions with ISNULL and COALESCE do not work.
But a CASE statement does work.
SELECT @MyStatusList = ISNULL(@MyStatusList,'')
...
September 28, 2012 at 10:18 am
#1543528
Simple, faster and still doesn't require tables.
select monthNumber
, DATENAME(MONTH,DATEADD(MONTH,monthNumber,0)- 1) MonthName
from ( values (1), (2), (3), (4), (5), (6), (7),...
March 16, 2012 at 1:12 pm
#1460723