Call a procedure that returns a refcursor, use it in another proc's sql?
oatsMar 30 2009 — edited Apr 1 2009I have a procedure that returns a refcursor; how can I include that refcursor in a sql statement that's in another procedure, or view etc?
This is the kind of foolery I've tried so far (myproc1 returns a ref cursor):
create or replace procedure myproc2
(
rc ref cursor
)
AS
rc1 ref cursor;
begin
EXECUTE myproc1(rc1);
open rc for
select rc1.* from rc1;
end myproc2;