Results 1 to 2 of 2

Thread: for loops?

  1. #1
    Join Date
    Apr 2004
    Posts
    31

    Unanswered: for loops?

    Hi all.

    Im trying to create a Stored Procedure that inserts multiple rows. But I can't get it to work.

    Here's how I would like it to work

    for test in (select myid from tblPlayers)
    begin
    Insert into tblMatches VALUES(test.myid, 2)
    end

    but obviously it does not work. Any ideas?

  2. #2
    Join Date
    Jul 2004
    Posts
    52
    Insert tblMatches
    Select myid, 2 FROM tblPlayers

Posting Permissions

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