How to make use of the data in a cursor returned from a stored procedure?
Date: 31 Jul 2002 03:55:37 -0700
Message-ID: <873e96d6.0207310255.56a13297_at_posting.google.com>
Hi,
[Quoted] I am new to oracle stored procedure.
I have written a stored procedure which returns a cursor. I am trying to write a corresponding test program to verify the cursor output.
The stored procedure is
PackClientCashLedger.GetCashLedgerRecord(ioSeverity, ioErrorMsg, cur,
'0001');
which cur is the returned cursor with firm_id as one of the field.
The testing program is as follows,
declare
cur types.cursortype;
c varchar2(4000);
ioSeverity varchar2(20);
ioErrorMsg varchar2(20);
begin
dbms_output.enable(1000000);
PackClientCashLedger.GetCashLedgerRecord(ioSeverity, ioErrorMsg,
cur, '0001');
for cur_rec in cur
loop dbms_ouput.put_line(cur_rec.firm_id); end loop;
end;
/
which returns the error when ran,
ERROR at line 13:
ORA-06550: line 13, column 17: PLS-00221: 'CUR' is not a procedure or is undefined ORA-06550: line 13, column 2:
PL/SQL: Statement ignored
Thanks in advance for any input,
Wing Received on Wed Jul 31 2002 - 12:55:37 CEST