I want to select a month from a column CMonth
but I want to preview it as :- 01,02,03,04,05,06,07,08,09,10,11,12.
I wrote this code but it preview it as :-
10 , 20 , 30 , 40 , 50 , 60 .... 10,11,12
SELECT
RTRIM(LTRIM(REPLACE(CAST(CMonth AS NCHAR(2)),' ','0')))
from tablename