22,209
社区成员
发帖
与我相关
我的任务
分享
" select top @size a.Action_ID, a.[User_ID], a.Total_Score ,b.Action_Desp,b.CreateTime ,b.Point_Change from "
+ " tbl_Action_Hist b inner join tbl_Record_Score a on a.Action_ID=b.Action_ID where a.Action_ID not in (select top (@size * (@now -1)) a.Action_ID from "
+ " tbl_Action_Hist b ) and b.Student_ID=@stuid and b.Point_Change like '-% ' and b.CreateTime between @starTime and @endTime"
StringBuilder strBl = new StringBuilder("select Action_ID, Question_ID, Type, Score, Fluency, Accuracy, Inegrity, "
+ " Rhythm, Others from tbl_Record_Score_Detail where Action_ID=@actid");
真的没报错declare @size int
set @size=2
select top (@size) * from master..spt_values
你把括号去掉就报错,主要是你放到字符串里面了。