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

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

Re: Oracle Functions with multiple selects writing to a cursor

From: Ed prochak <ed.prochak_at_magicinterface.com>
Date: 5 Dec 2003 04:55:47 -0800
Message-ID: <4b5394b2.0312050455.27297b6d@posting.google.com>


mgm_at_dca.net (Mike) wrote in message news:<20a78044.0312041104.2668c373_at_posting.google.com>...
> I'm using a package with mutiple functions that use cursors. Each
> function has multiple selects that i expect to create a recordet
> (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_NSYSUM_GFM;
>
> 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

Have you tried OUT parameters? Received on Fri Dec 05 2003 - 06:55:47 CST

Original text of this message

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