Hi,
I have a column called "Current_Month" which has the data
2010-06, 2010-07,2010-08 etc.
This doesn't give the date but has only year and month. The source is SQL Server 2005.
Can this current_month data be converted in this way?
June 2010
July 2010 etc.
Please let me know the syntax if its possible.
Sure:
CASE WHEN
SUBSTRING([CURRENT_MONTH],6,2) = '01'
THEN
'January '||SUBSTRING([CURRENT_MONTH],1,4)
WHEN
SUBSTRING([CURRENT_MONTH],6,2) = '02'
THEN
'Februari '||SUBSTRING([CURRENT_MONTH],1,4)
...
...
WHEN
SUBSTRING([CURRENT_MONTH],6,2) = '12'
THEN
'December '||SUBSTRING([CURRENT_MONTH],1,4)
ELSE
NULL
END
Thank you very much for the help.