Created
July 31, 2012 01:19
-
-
Save FaronBracy/3212517 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @startId bigint; | |
DECLARE @endId bigint; | |
SET @startId = 0 | |
SET @endId = 42327636 | |
WHILE (@startId > @endId) | |
BEGIN | |
UPDATE storage.StorageInformation | |
SET LocationTypeId = 0, BackupLocationTypeId = 0 | |
WHERE @startId <= StorageId and StorageId < @startId + 100000 and LocationTypeId IS NULL; | |
SET @startId = @startId + 100000; | |
IF @@ROWCOUNT = 0 | |
BEGIN | |
BREAK | |
END | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment