标题:exec的问题
取消只看楼主
smoon
Rank: 1
等 级:禁止访问
帖 子:461
专家分:0
注 册:2006-4-29
 问题点数:0 回复次数:0 
exec的问题

ALTER PROCEDURE ggpolicy
@page_record int,@pc_id varchar(10),@count1 int
AS
declare @strCounter varchar(10)
set @strCounter=convert(varchar(10),@page_record)
declare @strUserID varchar(10)
set @strUserID=convert(varchar(10),@count1)

exec ('select Top '''+@strCounter+'''* from db_policy where Pc_id like % '''+@pc_id+'''% and id not in
(select top '''+@strUserID+''' id from db_policy where Pc_id like %''' + @pc_id +'''% order by id desc) order by id desc'
)

搜索更多相关主题的帖子: exec 
2007-07-21 22:24



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-157157-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.830071 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved