Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DECLARE @MAX_COUNT INT;
- DECLARE @COUNT INT;
- DECLARE @INC INT;
- SET @COUNT = 0;
- SET @INC = 50000;
- SELECT @MAX_COUNT=MAX(ID) FROM dbo.MYTABLE(NOLOCK)
- WHILE @COUNT <= @MAX_COUNT
- BEGIN
- UPDATE dbo.MYTABLE
- SET NEW_NAME = REPLACE(NAME,' X','Y'))
- WHERE ID > @COUNT AND ID<=( @COUNT + @INC)
- SET @COUNT = (@COUNT + @INC)
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement