Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Can you return a result set from a stored procedure?

Can you return a result set from a stored procedure?

From: John Hamm <john_at_snapjax.com>
Date: Wed, 26 Jan 2000 18:06:24 -0500
Message-ID: <86num4$ela$1@news.gate.net>


I'm trying to return blocks of records from a query, 25 at a time. The only fast way I can think to do this would be to create a cursor in a package that runs the query, then create a stored procedure that fetches a record from the cursor each time, and run the procedure 25 times. Then, if I want the next 25 record block, I just call it again 25 times, and so on...

But if there was a way to return a recordset in a stored procedrue, I could just use "where rownum < 25", and fetch each time the stored procedure is ran...

I know you can do it in SQL Server, it's easy. All you do is:

create procedure test
...
  select * from patients

etc. Received on Wed Jan 26 2000 - 17:06:24 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US