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 -> Re: Help with CURSOR question, please?

Re: Help with CURSOR question, please?

From: Alan D. Mills <alanmNOSPAM_at_uk.europe.mcd.mot.com>
Date: Thu, 23 Jul 1998 16:47:37 +0100
Message-ID: <6p7lv8$9r3$1@schbbs.mot.com>


Make your second cursor parameterised and then add a where clause to it testing for it

something like
 CURSOR cur2 (varchar2 p_myvalue)
  IS
   SELECT e, f
   FROM b
  WHERE b.e = p_myvalue
   ORDER BY e, f ASC;

and then change your open statement for cursor 2 to be somethin like

OPEN curs (cur1.id);

--
Alan D. Mills

agibbons_at_erols.com wrote in message <6p7kmv$dmn$1_at_winter.news.erols.com>...
>Can you offer any suggestions please?

YEP
>
>I am trying to do the following:
>
>1. open cursor cur1 to retreive all a.id rows in table a
>2. for each a.id retreived from table a do the following:
> a) open cursor cur2 and retreive only those rows
> from table b where a.id = b.e
> b) write some text to a file
>
Received on Thu Jul 23 1998 - 10:47:37 CDT

Original text of this message

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