multi row Stored Procedure
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: multi row Stored Procedure

  1. #1
    Join Date
    Apr 2004
    Posts
    20

    multi row Stored Procedure

    Hi,

    Can i create stored procedure that returns a recordset without using cursors.



    Regards

  2. #2
    Join Date
    Apr 2004
    Location
    Boston MA
    Posts
    90
    Yes, then you have to hardcode the values. I don't know why would you do that.

    my_recordset(1).col1 := 1;
    my_recordset(1).col2 := 'blahblahblah';
    my_recordset(2).col1 := 2;
    my_recordset(2).col2 := 'moreblahblahblah';

  3. #3
    Join Date
    Apr 2004
    Posts
    20
    Sorry this is not what i meant.

    I mean how to return the result of multi records select statment using stored procedure.

  4. #4
    Join Date
    Apr 2004
    Location
    Boston MA
    Posts
    90
    What's wrong with cursors?
    You have to open ref cursor for a select statement to accomplish what you want. For that matter it is not a cursor but a cursor variable that points to a recordset described by the select statement for which you opened your ref cursor. Read about ref cursors they are pretty nifty thingamajigs.
    d

Posting Permissions

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



Click Here to Expand Forum to Full Width