Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

question on pipelined function

Sa SiFeb 27 2018 — edited Feb 27 2018

I would like implement a pipelined function like this please let me know if this is possible

create package p1 is

type t1 is table of varchar2(20000);

t2 t1;

function pipelined_func(p_n1 number) return SYS_REFCURSOR;

end p1;

create package body p1 is

function pipelined_func(p_n1 number) return t2 pipelined is

o_records sys_refcursor;

begin

open o_records for select listagg(ename,',') within group (order by deptno) from emp where deptno :1 using p_n1;

return;

end;

what I am trying to do is flush the results of listagg function using pipelined function. will this work ?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 27 2018
Added on Feb 27 2018
5 comments
298 views