i would like to combine this two int columns into one:
Month Year
1 2017
2 2016
12 2016
i used SELECT CAST(Year AS nvarchar(20)) + '-' + CAST(Month AS nvarchar(20)) AS newcolumn from table_name
however, the result that i got is
newcolumn
2017-1
2016-2
2016-10
my desired result is
newcolumn
2017-01
2016-02
2016-10
im using ms sql server.
Thanks