Does anyone have an idea on either better way to write the statement below or why I cant use "TO" for then results?
Trade Month field is a number between 1 and 12 and I cant use the date field in our tables due to certain limitations.
TRADE_MONTH=(CASE WHEN DATEPART(MONTH,GETDATE()) = 1 THEN 1 to 12 ELSE 1 to DATEPART(MONTH,GETDATE())-1 END)
Thanks in advanced.
Trade Month field is a number between 1 and 12 and I cant use the date field in our tables due to certain limitations.
TRADE_MONTH=(CASE WHEN DATEPART(MONTH,GETDATE()) = 1 THEN 1 to 12 ELSE 1 to DATEPART(MONTH,GETDATE())-1 END)
Thanks in advanced.