Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> pl/sql cursor question

pl/sql cursor question

From: Derek <d.rogers_at_its.uq.edu.au>
Date: Tue, 9 Dec 2003 17:40:41 +1000
Message-ID: <br3u62$ftr$1@bunyip.cc.uq.edu.au>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US