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

Home -> Community -> Usenet -> c.d.o.server -> Oracle Functions with multiple selects writing to a cursor

Oracle Functions with multiple selects writing to a cursor

From: Mike <mgm_at_dca.net>
Date: 4 Dec 2003 17:48:23 -0800
Message-ID: <20a78044.0312041748.3c932dc0@posting.google.com>


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

Original text of this message

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