Created
October 28, 2020 21:35
-
-
Save pfmoore/070931c3cafb42bbc6638e1e1509d72a 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 @PractitionerList TABLE(PracticionerID INT) | |
DECLARE @PractitionerID INT | |
INSERT @PractitionerList(PracticionerID) | |
SELECT PracticionerID | |
FROM Practitioner | |
WHILE(1 = 1) | |
BEGIN | |
SET @PracticionerID = NULL | |
SELECT TOP(1) @PracticionerID = PracticionerID | |
FROM @PractitionerList | |
IF @PracticionerID IS NULL | |
BREAK | |
PRINT 'DO STUFF' | |
DELETE TOP(1) FROM @PractitionerList | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment