declare @str varchar(120) set @str= 'insert into #Tmp(ID,Time,Analys,Flag) select top ' + cast(@RecordCount as varchar) + ' ID,Time,Analys,Flag FROM t_sample1 WHERE ShiftID='KK' and NameID='+@NameID+' ORDER BY Time DESC' exec (@str)
- 1 回答
- 0 关注
- 423 浏览
添加回答
举报
0/150
提交
取消