Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> pl/sql cursor question
Any PL/SQL guru's out there know if you can use an cursor result set as a
table within another SQL statement?
I want to do something like this:
DECLARE
TYPE dyn_cursor IS REF CURSOR;
inner_curs dyn_cursor;
outer_curs dyn_curosr;
BEGIN
OPEN inner_c FOR 'SELECT a FROM temp'; -- a couple of records returned
OPEN outer_c FOR 'SELECT some_column FROM some_other_table WHERE
some_column IN (SELECT 1 FROM inner_curs)';
...
END;
Thanks,
Derek.
Received on Tue Dec 09 2003 - 01:40:41 CST