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: PL/SQL Question re: loops

Re: PL/SQL Question re: loops

From: Jeremy Ovenden <jovenden_at_hazelweb.co.uk>
Date: 2000/04/14
Message-ID: <8d6eb5$633$1@gxsn.com>#1/1

Well no its related to the amount of 'other stuff' that one would do in the else.... Mainly though when you return to a piece of code and have to add another condition and find you have to modify all the indentation..it would be nicer to simply say 'next i' or whatever - I presume there is no such pl/sql instruction to do this then?

cheers
jeremy

peter hawdon wrote in message <8d57to$4s9$1_at_gxsn.com>...
>ermm...not sure if i understand what you want to do here but is it not just
>as straightforward as :
>
>for i in 1..10
> loop
> if (some condition is satisfied) then
> null;
> else
> do all the other stuff
> end if;
> end loop;
>
>
>or
>
>for i in 1..10
> loop
> if not(some condition is satisfied) then
> do all the other stuff
> end if;
> end loop;
>
>Jeremy Ovenden <jovenden_at_hazelweb.co.uk> wrote in message
>news:8d4pod$dd9$1_at_gxsn.com...
>> Apologies if this is a really simple question, but in the 'mock' pl/sql
>> below, is there a command to skip this iteration of a loop - basically
 not
>> quit the procedure with 'return;' nor quit the loop using 'exit;'. I am
>> aware this can be done using labels but is there an alternative?
>>
>> for i in 1..10
>> loop
>> if (some condition is satisfied) then
>> skip this iteration
>> end if;
>>
>> do all the other stuff
>> end loop;
>>
>> Mant tia
>>
>> cheers
>> jeremy - jovenden_at_hazelweb.co.uk
>>
>>
>>
>>
>
>
Received on Fri Apr 14 2000 - 00:00:00 CDT

Original text of this message

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