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: WHENEVER SQLERROR does'nt always work

Re: WHENEVER SQLERROR does'nt always work

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: Fri, 27 Jun 2003 04:37:12 +0000
Message-ID: <3049406.1056688632@dbforums.com>

Originally posted by Guy
> Hi
>
> I have a set of sql scripts that creates several tables and them
> populates them with rows (via insert statements).
> Each script begins with WHENEVER SQLERROR... and WHENEVER OSERROR...
> So it should halt once an error occures. I thought this will cover all
> possible errors.
> The problem is that it doesnt work with all kinds of errors. For
> example, if I wrote "nsert into" instead of "insert into" then
> SQL*PLUS throws this error message: SP2-0734: unknown command
> beginning "NSERT INTO..." but execution doesnt stop.
>
> Does it mean that WHENEVER SQLERROR doesnt catch "SP2" errors ? is
> there a way to catch this kind of errors ? I could'nt find a clue in
> SQL*PLUS documentation.
>
>
> T.I.A
>
> Guy

I think you should use tools like VisualSlick to create your scripts. It does syntax highlighting and indenting.

Programming 101 says to *always* test your program/script before deploying it or running it unattended. This would atleast catch your syntax errors.

Regards
/Rauf Sarwar

--
Posted via http://dbforums.com
Received on Thu Jun 26 2003 - 23:37:12 CDT

Original text of this message

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