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: resuming a loop

Re: resuming a loop

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Mon, 29 Sep 2003 17:09:12 -0700
Message-ID: <1064880552.819855@yasure>

Sheena wrote:

>i need to implement a functionality wherein i need to skip to the next
>loop index based on certain coditions. is there something called
>'resume loop' or something that does that in oracle pl/sql?
>
>

Could you spend a bit more time explaining what yo are trying to do? Loops don't have indexes.

If all you want to do is skip to the next record try this:

LOOP
   IF

      <your code here>
  END IF;
END LOOP; or

NextRecord EXCEPTION;

LOOP
   BEGIN

      <your code here>
      RAISE NextRecord;
   EXCEPTION
      WHEN NextRecord THEN
         NULL;

   END;
END LOOP;
-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Mon Sep 29 2003 - 19:09:12 CDT

Original text of this message

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