Home » SQL & PL/SQL » SQL & PL/SQL » How to use strong typed ref cursor in dynamic SQL?
How to use strong typed ref cursor in dynamic SQL? [message #224] Tue, 29 January 2002 16:01 Go to next message
George
Messages: 68
Registered: April 2001
Member
Hi,

I have a strongly typed ref cursor return a records, and use the cursor in dynamic sql, but I get a PLS-00455 error. below is part of my code:
CREATE OR REPLACE PACKAGE perDiemTotalInv IS
PRAGMA SERIALLY_REUSABLE;
TYPE det_rec is RECORD
(CarrierName VARCHAR2(60),
consigneeName VARCHAR2(60),
facility VARCHAR2(60),
...);
TYPE curType IS REF CURSOR return det_rec;
function diemDet (
party_code IN VARCHAR2,
freeday_type IN VARCHAR2)
RETURN curType;
END;
CREATE OR REPLACE PACKAGE BODY perDiemTotalInv IS
PRAGMA SERIALLY_REUSABLE;
function diemDet (
party_code IN VARCHAR2,
freeday_type IN VARCHAR2)
RETURN curType IS
partytype NUMBER(10);
pid NUMBER(10);
err_num NUMBER;
err_msg VARCHAR2(200);
query_statement VARCHAR2(600);
from_statement VARCHAR2(600);
sql_statement VARCHAR2(3000);
where_statement VARCHAR2(2000);
sum_cv curType;
Begin
.... sql_statement := ' SELECT pc.partyname,
pcon.partyname,
f.facilityname,
... '
OPEN sum_cv FOR sql_statement USING pid;
END diemDet;
END;

Thanks
Re: How to use strong typed ref cursor in dynamic SQL? [message #225 is a reply to message #224] Tue, 29 January 2002 16:24 Go to previous message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
strongly typed ref cursors are not possible. you have to use weak ref cursors
Previous Topic: Help, procedure not compiling
Next Topic: help!!!
Goto Forum:
  


Current Time: Fri Mar 29 09:56:56 CDT 2024