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 me in cursors.

Re: help me in cursors.

From: Sunil Godithi <sunil_at_ameya.com>
Date: 1997/02/15
Message-ID: <330668B9.56C4@ameya.com>#1/1

I am assuming you are using Forms 4.5.
Try declaring a record of cursor type,
and then assigning the values to forms variables. And If using forms4.5, you would need the NEXT_RECORD; and DBMS_OUTPUT will not work.

 DECLARE
 cursor c1 is

         select st_id, sample_date, time, compid, concentration
          from analyzed_samples1
         where st_id = :segments.st_id and
         (sample_date between :segments.firstdate and :segments.lastate);
  

 c1_rec c1%rowtype;   

 BEGIN   

         open c1;
         loop
  
                 fetch  c1 into c1_rec;
                 if c1%notfound Then
                      EXIT;
                 Else
  			:analyzed_samples3.st_id := c1_rec.st_id;
        	        :analyzed_samples3.sample_date:= c1_rec.sample_date;

:analyzed_samples3.time:= c1_rec.time;
:analyzed_samples3.compid:= c1_rec.compid;
:analyzed_samples3.concentration:= c1_rec.concentration;
next_record; End if; end loop; synchronize; close c1;

 END;
-- 
"If you want what you've never had, 
 you must be willing to do what you've never done."
Received on Sat Feb 15 1997 - 00:00:00 CST

Original text of this message

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