日期:2014-05-19  浏览次数:20485 次

为什么这个0加不上?
select   concat(concat(YY, '- '),case   when   MM < '10 '   then   concat( '0 ',MM)   else   MM   end   )   from   social.grantdetail;

显示都是2007-1

------解决方案--------------------
Select Cast(YY As Varchar) + '- ' + Right(100 + Cast(MM As Int), 2) from social.grantdetail;