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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Oracle + Unix question , Error validation for SQL statements in co process ?.

RE: Oracle + Unix question , Error validation for SQL statements in co process ?.

From: Kevin Lange <klange_at_ppoone.com>
Date: Tue, 20 Jul 2004 13:15:30 -0500
Message-ID: <ED1256BD4F253C44B1627B2D365A334F0528FB4D@ppoone1.ppoone.com>


I did not know that. Thats for this info as well as the rollback info.

-----Original Message-----
From: Daniel Fink [mailto:Daniel.Fink_at_Sun.COM] Sent: Tuesday, July 20, 2004 1:12 PM
To: oracle-l_at_freelists.org
Subject: Re: Oracle + Unix question , Error validation for SQL statements in co process ?.

Inline

Kevin Lange wrote:
> The thing is, the ?$ will not give you anthing but a 0 when you use it after
> the SQL statement because SQLPLUS finish correctly ... even if the SQL that
> is ran does not. i.e. The RC of SQLPLUS will always be 0 unless SQLPLUS
> itself fails.

I must disagree. You can return a numeric value from 0 to 255 (?) from a sql*plus session. If you return a number larger than 255, it is the modulus of value/256.

$ echo $?

0
$ sqlplus "/ as sysdba"

SQL> exit 1

$ echo $?

1
$ sqlplus "/ as sysdba"

SQL> whenever sqlerror exit 1
SQL> select * from alskjfajafls;
select * from alskjfajafls

               *
ERROR at line 1:
ORA-00942: table or view does not exist

$ echo $?

1
$ sqlplus "/ as sysdba"

SQL> exit 254

$ echo $?

254
$ sqlplus "/ as sysdba"

SQL> exit 255

$ echo $?

255
$ sqlplus "/ as sysdba"

SQL> exit 256

$ echo $?

0
$ sqlplus "/ as sysdba"

SQL> exit 257

$ echo $?

1
$



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request_at_freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Tue Jul 20 2004 - 13:12:11 CDT

Original text of this message

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