Skip to content

Instantly share code, notes, and snippets.

@FaronBracy
Created July 31, 2012 01:19
Show Gist options
  • Save FaronBracy/3212517 to your computer and use it in GitHub Desktop.
Save FaronBracy/3212517 to your computer and use it in GitHub Desktop.
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