I'm trying to concatenate two stings together on the set command, but instead of concatenating it is adding the two strings together.
@ProcessDate = '4/2/2012'
declare @YearMonth varchar(6)
set @YearMonth = Year(@ProcessDate) + REPLICATE('0',LEN(Month(@ProcessDate))) + CONVERT(varchar(2),Month(@ProcessDate))
Instead of getting 201204 - Which is what I want I'm getting 2016