Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Can EXIT cause SQLPlus to have a different return value?

Re: Can EXIT cause SQLPlus to have a different return value?

From: Brian Peasland <peasland_at_email.msn.com>
Date: Thu, 10 Jun 1999 18:57:42 -0500
Message-ID: <erun105s#GA.386@cpmsnbbsa02>

>I have a situation where I need to monitor the results of a SQL
>statement executed by SQLPlus (possibly isql) to determine what action
>to take in some third party software. However, regardless of what the
>SQL statement does, SQLPlus always returns a 0 because it (SQLPlus)
>correctly terminated. How can I cause SQLPlus to return something other
>than zero based on the results of the SQL statement? I've looked at the
>EXIT statement but that doesn't appear to do what I need.

Have you tried to create a PL/SQL statement. That way, you can use the EXCEPTIONS portion of PL/SQL. If an error occurs, you can raise an exception. Properly done, you can create your own error codes and your application program can read those error codes to determine appropriate action.

Hope that helps,
Brian Peasland
peasland_at_msn.com Received on Thu Jun 10 1999 - 18:57:42 CDT

Original text of this message

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