随笔分类 -  sql server

摘要:并不是真的传入array一样的数组,而是一个以逗号分隔的字符串View Code /*作业优先级跳到最前面*/ALTER PROCEDURE proc_TaskJumpPriority( @ID varchar(100)--多条作业ID如:10,11,12 ) AS DECLARE @PointerPrev int DECLARE @PointerCurr int DECLARE @TId int SET @PointerPrev = 1 WHILE(@PointerPrev <LEN(@ID)) BEGIN SET @Po... 阅读全文
posted @ 2011-09-08 17:59 jeffreyQ 阅读(5460) 评论(1) 推荐(0)
摘要:我只在sql server 2005上测试通过ALTER proc proc_ChangTaskPriority( @ID int)as declare @xh int declare @id_temp int --定义游标 declare XH_cursor cursor for select t.XH from TableName t where t.ID > @ID --打开游标 open XH_cursor --从游标取记录 fetch next from XH_cursor into @xh --当有记录 while @@fetch_status=0 begin select 阅读全文
posted @ 2011-08-01 19:00 jeffreyQ 阅读(1509) 评论(0) 推荐(0)

跟小D每日学口语
跟小D每日学口语