Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> dynamic sql to return a result set
I'd like to have a stored proc return a result set (via a parameter) using
dynamic sql. Can someone help. This is what i have:
CREATE OR REPLACE PACKAGE "ODB"."MYTYPES" as
type cursorType is ref cursor;
end;
CREATE OR REPLACE PROCEDURE "ODB"."TRAX_CUST_RELEASE"
(RESULT_SET in OUT ODB.myTypes.cursorType)
is
s_sql varchar2(100);
BEGIN
s_sql := ' select * from odb.trax_customer_release ';
EXECUTE IMMEDIATE s_sql into RESULT_SET;
END;
it gives me: ORA-00932 inconsistent datatypes.
-- Luciano Belotto replace spam with traxsoftware for e-mailReceived on Tue Jun 25 2002 - 12:49:21 CDT