Declare @PubId int
set @PubId = 1046
Declare @NewsId int
set @NewsId = 7026
Begin Tran T2
WHILE (@NewsId <= 7125)
BEGIN
update MstReports
set ReportCode = 'Ovum' + CONVERT(VARCHAR(10),@PubId)
where NewsId = @NewsId
print @newsid
SET @NewsId = @NewsId + 1
SET @PubId = @PubId + 1
IF @NewsId = 7126
BREAK;
END
rollback
or
commit
No comments:
Post a Comment