I want to select value = 201301
201301
select getdate(), cast(datepart(year, getdate()) as varchar(4))+cast(datepart(MONTH, getdate()) as varchar(2))
it returns 20131.
20131
What is the normal way to do this?
SELECT LEFT(CONVERT(varchar, GetDate(),112),6)