Home » SQL & PL/SQL » SQL & PL/SQL » Retrieving Multiple OUT Parameter Rows
Retrieving Multiple OUT Parameter Rows [message #39737] Tue, 06 August 2002 10:17 Go to next message
Dave Dodson
Messages: 3
Registered: July 2002
Junior Member
Know how to retrieve a cursor from a proc, but not how to retrieve multiple rows of OUT parameters.

Proc A, which must return either a cursor or multiple rows of OUT parameters, gets the rows it must return from successive calls to Proc B, which must return either a cursor or multiple rows of OUT paramenters. Proc B gets the rows it must return from multiple calls to Proc C, which could either return a one-row cursore or one-row set of OUT parameters.

My problem is that Procs A and B must create their output from calls to Procs, not from Selects. I presume this would work fine if I used OUT parameters, in the form:

FOR onerow in sampleCursor
LOOP
outParm1(i) := onerow.field1;
outParm2(i) := onerow.field2;
i := i + 1;
exit when sampleCursor%NOTFOUND;
END LOOP;

but I don't know how to retrieve these rows of OUT parameters from within another proc. I only know how to retrieve a cursor from a Proc, and I can't manipulate a cursor with the flexability I have with OUT parameters.

Any way to do this?

Dave
Re: Retrieving Multiple OUT Parameter Rows [message #39738 is a reply to message #39737] Tue, 06 August 2002 11:50 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
search this site for "ref cursor" and "passing array" or "passing pl/sql table". You could also consider simply having a pl/sql table in a package which toy can populate/retrieve from any procedure because it is global.
Previous Topic: Select from a remote database...
Next Topic: Hierarchy remove
Goto Forum:
  


Current Time: Tue Apr 16 09:12:40 CDT 2024