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

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

Re: Cursors

From: Wim Jans <wim_at_cereus.be>
Date: 1999/12/21
Message-ID: <01bf4bbc$04a01c80$380210ac@wja.kodela.iuh.an>#1/1

Hi,

You could try this:

declare

  cursor c_a is
  select fielda1,

           fielda2, 
           ...
           fieldan

 from tablea
 where ...;

 r_a c_a%rowtype;

  cursor c_b (p_1 tablea.fielda1%type) is   select fieldb1,

           fieldb2, 
           ...
           fieldbn

 from tableb
 where fieldb1 = p_1;

r_b c_b%rowtype;

begin

  open c_a;
  fetch c_a into r_a;
  close c_a;

  open c_b(r_a.fielda1);
  fetch c_b into r_b;
  close c_b;

end;

Wim

Stéphane D'Hoedt <sdhoedt_at_softhome.net> wrote in article <83nh8l$p6g$1_at_naxos.belnet.be>...
> 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 - 00:00:00 CST

Original text of this message

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