Results 1 to 3 of 3

Thread: Loop Inside SP

  1. #1
    Join Date
    Sep 2003
    Posts
    5

    Unanswered: 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,

  2. #2
    Join Date
    Sep 2003
    Posts
    522
    while (<true_condition>) begin
    ....
    end

    there is no for equivalent in the engine (yet)

  3. #3
    Join Date
    Dec 2003
    Posts
    454
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •