declare @UserName varchar(400)
declare @EM varchar(400)
declare  pcurr cursor for select UserName, ErrorMessage from ErrorLog
open pcurr  
fetch next from pcurr into @UserName,@EM
while (@@fetch_status = 0)  
begin  
 --set @Str=@Str+@ProductName
 print @UserName
 print @EM
 fetch next from pcurr into @UserName  ,@EM
end  
close pcurr  

 

posted on 2013-06-12 22:58  gzh4455  阅读(226)  评论(0编辑  收藏  举报