Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Where should I put WHENEVER SQLERROR CONTINUE clause?

694243Jan 7 2010 — edited Jan 7 2010
Hi all,

this is my situation:

I have 2 compiled packages and one compiled procedure which uses the 2 packages. I want to start the procedure with sql*plus.
To do this, I wrote a script and start the script from sql*plus:
SQL> @start_proc.sql
The start_proc.sql script looks like this:
SET SERVEROUTPUT ON
SET ECHO OFF
SET TERMOUT OFF

WHENEVER SQLERROR CONTINUE

SPOOL /home/scott/proc_out.txt

BEGIN
  SCHEMA1.TEST_PR;
  COMMIT;
END;
/

SPOOL OFF
The question is, where should i put the statement WHENEVER SQLERROR CONTINUE ?
In the current position, the procedure does not start at all. If I remove the statement completely, then I get error on the first record and the procedure does not go on with the rest of the records...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 4 2010
Added on Jan 7 2010
6 comments
13,574 views