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: Tue, 30 Sep 2003 14:28:46 -0700
Message-ID: <1064957326.886500@yasure>


Sheena wrote:

>Daniel Morgan <damorgan_at_x.washington.edu> wrote in message news:<1064880552.819855_at_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;
>>
>>
>
>yes, i agree that loops dont have indexes. i was wondering if 8i has
>the same functionality that Java has in its loops (i think it is
>resume /continue or something like that), where you can have control
>go back to the next 'index' in the loop. in other words skip execution
>of the rest of the loop and increment the loop to execute the next
>index..
>
>

No. They are different languages. Oracle accomplishes the same functionality in its own way.

-- 
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 Tue Sep 30 2003 - 16:28:46 CDT

Original text of this message

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