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

Home -> Community -> Usenet -> c.d.o.misc -> Problem with nested table cursor

Problem with nested table cursor

From: Peter Patchnikov <peter_at_tls.tc>
Date: 30 Nov 2001 02:41:30 -0800
Message-ID: <9427ccf6.0111300241.6a42c186@posting.google.com>


Hi all,
I Use Crystal Report 8.01, and Oracle 8i, I have a stored Procedure in the paccage and inside i have a cursor that filling an nasted table. at the end of the procedure i have some records witch i want to see on the Report. Well if I want to use a stored procedure with Crystal Report it must be look like this:

PROCEDURE USESP (a in varchar2 , p in out Proba.curs ) IS  BEGIN
  OPEN p FOR
  SELECT _something_
  FROM _somewhere_ ;
 END; where curs is:
  type curs is ref cursor return EUR%ROWTYPE;

If I call stored procedure before OPEN operator and then OPEN the cursor for select from nested table ther is an error PLS-00201 - identifier must be declared. Well it is the part of my procedure:

procedure CheckUp( dToDay IN DATE ,

                   sMod      IN VARCHAR2,
                   aBALACC   IN OUT ArrBALACC,
                   sUniqCode IN VARCHAR2 DEFAULT NULL)
IS
bRet       BOOLEAN:=FALSE;

tCursor CursorArr;
nCounter NUMBER;
nSynthLen NUMBER(2);
nEnd_Bal NUMBER(4);
dCurr_Date DATE;
counter NUMBER:=1;
i NUMBER;
BEGIN
......

  LOOP
  FETCH tCursor INTO aBALACC(nCounter);
    IF( tCursor%NOTFOUND )THEN
      EXIT;
    END IF;
    nCounter:=nCounter+1;
  END LOOP;
......

END; and the wrong procedure is:
PROCEDURE CHECKUP
     ( dToDay    IN DATE , 
        sMod      IN VARCHAR2,
        sUniqCode IN VARCHAR2 DEFAULT NULL,
        cBALACC   IN OUT AccRep.CursBALACC
      ) 

   IS
   TYPE ArrBALACC IS TABLE OF balacc%ROWTYPE;    A accrep.ArrBALACC;
   BEGIN         	
     AccRep.CheckUp(dToDaY,sMod,A,sUniqCode); 		 
     OPEN cBALACC FOR SELECT * FROM A;

   END; is there anybody can help?????

    Thank You! Peter Received on Fri Nov 30 2001 - 04:41:30 CST

Original text of this message

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