Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: How to return an value from Oracle to Unix in a shell scrtip.
In article <39EDF96B.3A805BF1_at_email.com>,
gojo <kckcabc_at_email.com> wrote:
> Hi there,
>
> I've a shell script that runs some Oracle procedures, what I would
like
> to know is if the Oralce procedure was successful or had any error.
> Basically a flag that tells me everything is OKed, so I can do
something
> else in the subsequent shell codes.
>
> Does anyone what are the methods to achieve that ?
>
> Thanks,
> Ken.
>
>
include
whenever sqlerror exit return_value|variable_name|:bind_variable
in your sqlplus script and the value you use will be passed as return
code, and of course you can query that by $?
Hth,
-- Sybrand Bakker, Oracle DBA All standard disclaimers apply ------------------------------------------------------------------------ Sent via Deja.com http://www.deja.com/ Before you buy.Received on Mon Oct 23 2000 - 04:05:06 CDT
![]() |
![]() |