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 ?