Re: Continue on Exception

From: Steven Jelfs <S.Jelfs_at_btinternet.com>
Date: 1997/12/24
Message-ID: <67pnl6$pa7$1_at_uranium.btinternet.com>#1/1


What a smart arse!!!!! :-))

Paul Brooks wrote in message <349FB6E9.54A_at_btinternet.com>...
>Gnomic wrote:
>>
>> OK, must have missed it. I've RTFM'd on how to continue after an
 exception
>> and can't find a decent example. I'm trying to do the following:
>>
>> for i in i_start..i_end loop
>>
>> insert into tbl (xx,yy) values (aa,bb);
>>
>> end loop
>>
>> exception
>> when others -- like a duplicate record which I don't care about!
>> continue
>> end
>>
>> I don't want to read and then write if I can help it since it doubles my
>> I/O. Can anyone point me towards an example? Thanks in advance.
>
>To take your example, you can do the following :
>
>for i in i_start..i_end
>loop
>
> begin
> insert into tbl (xx,yy) values (aa,bb);
> exception
> when dup_val_on_index then
> null;
> end;
>
>end loop;
>
>
>NOTE : it is not good practice to put a null statement into a WHEN
>OTHERS clause

Where's that then? Received on Wed Dec 24 1997 - 00:00:00 CET

Original text of this message