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'
)