复制代码 代码如下:
Create proc getWorkPlan2
(@intCounter int
,@lngUserID int)
as
select Top 5 lngWorkID,strWorkName,strExecHumanName,strBeginDate
from worklist where lngExecHumanID= @lngUserID
order by lngWorkID desc
复制代码 代码如下:
ALTER proc getWorkPlan2
(@intCounter int
,@lngUserID int)
as
)
exec sp_executesql ('select Top '+convert(varchar(10),@intCounter)+' lngWorkID,strWorkName,strExecHumanName,strBeginDate from worklist where lngExecHumanID= '
+convert(varchar(10),@lngUserID) +' order by lngWorkID desc '
复制代码 代码如下:
ALTER proc getWorkPlan2
(@intCounter int
,@lngUserID int)
as
declare @strCounter varchar(10)
set @strCounter=convert(varchar(10),@intCounter)
declare @strUserID varchar(10)
set @strUserID=convert(varchar(10),@lngUserID)
exec sp_executesql ('select Top '+@strCounter+' lngWorkID,strWorkName,strExecHumanName,strBeginDate from worklist where lngExecHumanID= '
+@strUserID +' order by lngWorkID desc '
)
复制代码 代码如下:
Alter proc getWorkPlan2
(
@intCounter int
,@lngUserID int
)
as
set rowcount @intCounter
select lngWorkID,strWorkName,strExecHumanName,strBeginDate
from worklist where lngExecHumanID= @lngUserID
order by lngWorkID desc
新闻热点
疑难解答