I am trying to fetch results from an oracle SP which is returning cursors. I have the following code which does not seem to work...
declare VARIABLE csr1 REFCURSOR;
declare VARIABLE csr2 REFCURSOR;
declare VARIABLE csr3 REFCURSOR;
declare VARIABLE csr4 REFCURSOR;
declare VARIABLE csr5 REFCURSOR;
EXEC getReportData('PUB',:csr1,:csr2,:csr3,:csr4,:csr5);
PRINT csr1;
I looked around SO for this type of question and that is there I got the above code.
In that same answer there is a second option to loop as well. but that will not work for me since one of the lines in that code says:
rej_rec Reasons_for_Rejection%ROWTYPE;
Reasons_for_Rejection
is supposedly the table name...however in my SP they are using some internal table because query is like this:
select c.blah from (select blah1 from blah) c