我有一个查询
WHILE @@fetch_status = 0
BEGIN
SET @message =' ,' + CASE WHEN @year < 10 THEN 'socyr0' ELSE 'socyr' END + CAST(@year AS varchar) + ' as '+ CAST(@sql AS varchar) + ','
PRINT @message
FETCH NEXT FROM SocioCursor INTO @year
SET @sql = @sql + 1
END
结果是几个字符串
socyr08 as 2006,
socyr09 as 2007,
socyr10 as 2008,
socyr11 as 2009,
socyr12 as 2010,
我应该改变什么才能得到
socyr08 as 2006,
socyr09 as 2007,
socyr10 as 2008,
socyr11 as 2009,
socyr12 as 2010