Re: PL/SQL nested cursors and loops

From: Holger Blank <hblank_at_iset.uni-kassel.de>
Date: 1996/09/06
Message-ID: <32303210.4234_at_iset.uni-kassel.de>#1/1


Kelvin, Stingel wrote:

>
> Im feeding the result from c1 into c2.
> For every loop of c1, the cursor c2 opens fetches and closes
>
> Can I feed c1 into something then close c1 and open c2 to process the
> values.
>

try using cursor-for-loops (pl/sql v2) ?

for c1 in (select a from t1) loop

for c2 in (select b from t2

            where b = c1.a) loop

.... sql or pl/sql ...

end loop;
end loop;

i think to use cursor-for-loops is more comfortable than the

v1-cursor handling. you don't need 'open_cursor', 'fetch', 
'exit' and 'close'. this cursors are faster and the source is 
much more readable. 

holger Received on Fri Sep 06 1996 - 00:00:00 CEST

Original text of this message