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 -> Re: refcursor for pipeline table function?

Re: refcursor for pipeline table function?

From: Ganesh Raja <ganesh_at_gtfs-gulf.com>
Date: Tue, 10 Jun 2003 10:28:14 +0800
Message-ID: <1055212095.533297@cswreg.cos.agilent.com>


See if this Helps....

create or replace package pkg_pipeline as

--
HTH

Regards,
Ganesh R


"Richard Kuhler" <noone_at_nowhere.com> wrote in message
news:dc6Fa.68707$S9.1944220_at_twister.socal.rr.com...

> How can you declare a strict reference cursor for a pipeline table
> function based on objects?
>
>
> For example ...
>
> create or replace type tobj is object (num number, dt date);
> /
>
> create or replace type ttab is table of tobj;
> /
>
> create or replace package pkg_pipeline as
>
> -- this doesn't work
>
> type trefcur is ref cursor return tobj;
>
>
> -- neither does this
>
> type trefcur is ref cursor return ttab%rowtype;
>
>
> -- this gives an internal error
>
> cursor cur_dummy is
> select tobj(null, null)
> from dual;
>
> type trefcur is ref cursor return cur_dummy%rowtype;
>
>
> function f_pipeline
> return ttab
> pipelined;
>
> function f_get_refcursor
> return trefcur;
>
> end pkg_pipeline;
> /
>
>
> Note: we won't have any real table in the database with this structure
> (that's the whole point of the pipeline).
>
>
> Thanks,
> Richard
>
Received on Mon Jun 09 2003 - 21:28:14 CDT

Original text of this message

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