Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Oracle Functions with multiple selects writing to a cursor
I'm using a package with multiple functions that use cursors. Each
function has multiple selects that i expect to create a recordset
(item1, item2...).
Sql as follows.
CREATE OR REPLACE PACKAGE BODY x_pkg AS
FUNCTION GET_1 (dSTARTDATE IN DATE,dENDDATE IN DATE) RETURN REF_CURSOR
IS
my_cur ref_cursor;
BEGIN
OPEN my_cur FOR
SELECT COUNT(*) FROM ..........;
OPEN v_cur FOR
SELECT COUNT(*) FROM .......;
RETURN v_cur;
END GET_1;
my_cur contains only the results of the last select. Is it possible to
return this recordset( 1 row with multiple columns) from Oracle
function or do I need something else?
Thanks a lot for any help!
mgm_at_dca.net
Received on Thu Dec 04 2003 - 19:48:23 CST