Subject: Use returned cursor in another PL/SQL proc
Posted By: robertogalbiati Post Date: 1/5/2006 11:19:03 AM
hi all

i have a procedure like this  (in package CORP_REPORT):

PROCEDURE Confronto
(  IN_IDREQUEST IN NUMBER,
   CUR_1 IN OUT CORP_REPORT.TCUR_1
 )
IS
BEGIN
  ... do something ...
  OPEN CUR_1 FOR
    SELECT * from table1, table2, tableEtc..
    where <something specific> ;

END;

it works perfectly with ORACLE.NET data provider, ADO, Crystal, etc...

But I need in some case to process that data again in PL/SQL, something like:

PROCEDURE NewConfronto
(  IN_IDREQUEST IN NUMBER,
   CUR_1 IN OUT CORP_REPORT.TCUR_1
 )
IS
  InternalTCUR CORP_REPORT.TCUR_1;
BEGIN

  EXEC Confronto(IN_IDREQUEST,InternalCUR);
  
  OPEN CUR_1 FOR
   SELECT x,y,z
    from InternalCUR
    where <..other conditions...>;
END;

How can this be done?
On the Web everyone explain how to use returned cursor OUT OF ORACLE, but not in...

Thanks
Roberto


  


Go to topic 38336

Return to index page 403
Return to index page 402
Return to index page 401
Return to index page 400
Return to index page 399
Return to index page 398
Return to index page 397
Return to index page 396
Return to index page 395
Return to index page 394