Wednesday, March 21, 2012

Loop Inside SP

hello,
anyone for help?
what's the syntax of for.next, do while loop in Stored Proc?
ur help is much appreciated!
thanks,while (<true_condition>) begin
...
end

there is no for equivalent in the engine (yet)|||FOR and NEXT are both keywords in MSSQL, but there is no FOR ... NEXT loop. If you want to do something from the first row to the last one in your RecordSet, you can use FETCH.sql

No comments:

Post a Comment