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: exit status of sqlplus???

Re: exit status of sqlplus???

From: Brian P. Mac Lean <brian.maclean_at_teldta.com>
Date: 1997/03/04
Message-ID: <331C4559.479E@teldta.com>#1/1

[KSH]: sqlplus -s / <<EOF
> whenever sqlerror exit failure;
> select * from error_dual;
> exit;
> EOFselect * from error_dual

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

[KSH]: echo $?

1                   <- exit failure

[KSH]: sqlplus -s / <<EOF
> whenever sqlerror exit failure;
> select * from dual;
> exit;
> EOF

D
-
X  

[KSH]: echo $?

0                   <- exit success

[KSH]:
-- 
                       \\|//
                       (0-0)
           +-----oOO----(_)-----------+
           | Brian P. Mac Lean        |
           | Database Analyst         |
           | brian.maclean_at_teldta.com |
           | http://www.teldta.com    |
           +-------------------oOO----+
                      |__|__|
                       || ||
                      ooO Ooo
Received on Tue Mar 04 1997 - 00:00:00 CST

Original text of this message

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