日期:2014-05-17 浏览次数:20603 次
declare @str varchar(2000)
declare @i int
set @i = 1
set @str=''
SELECT @str=@str+cast((@i+1) as CHAR(1))+isnull(tm.sAnswer,'')
FROM tbAnswer t
left outer join dbo.tbPollMyAnswer tm on tm.iAnswerId=t.iAnswerId
WHERE t.iQuestionID=12 and tm.sAnswer is not null
print @str
declare @str varchar(2000)
declare @i int
set @i = 1
set @str=''
SELECT @str=@str+cast((@i+1) as CHAR(1))+isnull(tm.sAnswer,''),num=rownumber()over(order by getdate())
FROM tbAnswer t
left outer join dbo.tbPollMyAnswer tm on tm.iAnswerId=t.iAnswerId
WHERE t.iQuestionID=12 and tm.sAnswer is not null
print @str