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

refcursor for pipeline table function?

From: Richard Kuhler <noone_at_nowhere.com>
Date: Mon, 09 Jun 2003 20:35:21 GMT
Message-ID: <dc6Fa.68707$S9.1944220@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

    type trefcur is ref cursor return tobj;

    type trefcur is ref cursor return ttab%rowtype;

    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 - 15:35:21 CDT

Original text of this message

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