I'd like to be able to take a ref cursor and transform it by selecting from it into another ref cursor. For example, something like this:
begin
declare c_cur sys_refcursor;
c_cur2 sys_refcursor;
open c_cur for
select 1 from dual;
open c_cur2 for
select 1
from c_cur
where 1 = 2;
end;
/
Is it possible in Oracle to select FROM the results of a ref cursor, in a SELECT statement?