Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> SQL*PLUS and shell scripts
Hi All,
I am trying to productionise some of the queries that we run. My question is:
How can I return the sql error code to a Unix shell script? I tried putting "WHENEVER SQLERROR EXIT SQLCODE" and although sqlplus exits with an error it does not return the correct code to the shell script which always displays 1.
I also tried hardcoding 942 in place of sqlcode and when i displayed the
error code in the shell script it displays 174.
I know this is possible as I have done this DCL on VMS but I am missing
something here.
Can some one help????
Thanks
-- Prashant Gaba Consultant e-mail: pgaba_at_usccmail.bms.comReceived on Thu Mar 13 1997 - 00:00:00 CST