Created
December 1, 2009 18:59
-
-
Save williamsjj/246532 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 firstQuery Cursor for | |
| SELECT [id] | |
| FROM TableName | |
| for Read Only; | |
| Declare @myid int; | |
| Open firstQuery; | |
| Fetch Next from firstQuery Into @myid; | |
| WHILE (@@fetch_status <> -1) | |
| BEGIN | |
| EXEC myStoredProc @param1 = @myid; | |
| Fetch Next from cspid Into @myspid; | |
| END; | |
| close firstQuery; | |
| deAllocate firstQuery; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment