Re: Continue on Exception
Date: 1997/12/31
Message-ID: <01bd15a7$21c7b5e0$9115c1cf_at_default>#1/1
Just a followup:
My problem was due to blocking, specifically I needed to
for i in start..finish loop
declare
i, start, finish, etc
begin
blah,blah,blah.... begin insert.... exception on dup_val_on_index then null; end more blah...
end;
This, as all you experts know, will cause the exception to be captured within the inner begin/end block, and then drop back to the loop and continue.
The books could (SHOULD!) give a better example.There is one example in the oracle SQL manual (not prominent...I missed it twice) and none (shocked I am) in the Complete Oracle Reference (the silver book...otherwise outstanding!).
Thanks All!
Gnomic <Gnomic_at_swbell.net> wrote in article
<01bd0f61$66f94b20$9914c1cf_at_default>...
> 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.
>
>
Received on Wed Dec 31 1997 - 00:00:00 CET