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

Home -> Community -> Usenet -> c.d.o.server -> Re: Cursors

Re: Cursors

From: Troy Tinnes <q10641_at_cig.nml.mot.com>
Date: Wed, 22 Dec 1999 13:57:08 +0900
Message-ID: <38605A24.2A302A31@cig.nml.mot.com>


You can do this:

DECLARE
CURSOR one IS SELECT x, y, z

                            FROM   table_one;

CURSOR two IS SELECT a,b,c
                            FROM   table_two
                            WHERE a = var_x;   --- var_x is a PL/SQL
variable name

:
BEGIN
OPEN one;
FETCH one INTO var_x, var_y, var_z; -- var x has some value now

OPEN two;                                            -- the OPEN binds th=
e
value of

cursor so that the cursor

"Stéphane D'Hoedt" wrote:

> Hi,
>
> I made cursors in my procedure. But I would like to know if I can call =
a
> field of a cursor in another cursor.
> I hope there is someone who can help me.
>
> Thanks,
> Stéphane D'Hoedt
Received on Tue Dec 21 1999 - 22:57:08 CST

Original text of this message

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