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: sqlplus exit code

Re: sqlplus exit code

From: Anurag Varma <avdbi_at_hotmail.com>
Date: Tue, 08 Jul 2003 23:28:09 GMT
Message-ID: <dsIOa.32$IF6.15@news02.roc.ny>

"Justin" <e_fax_t_at_msn.ZAPME.com> wrote in message news:3f0b252c$0$6523$afc38c87_at_sisyphus.news.be.easynet.net...
> Hi,
>
> on unix I see that I can control the exit code sqlplus
> returns to the shell through the 'exit' command. Fine.
> Is there an easy way to pass on the integer return code
> of a pl/sql function as exit code, then?
>
> Thanks in advance!

Yes its possible.
Something like:

var ret_code NUMBER

begin :ret_code := myfunc(param,param); end; /

exit :ret_code;

.....

or

col ret_code new_value ret_code
select myfunc(param,param) ret_code from dual;

exit &ret_code

I'm not sure .. but the above examples might be subject to some limitations

HTH
Anurag Received on Tue Jul 08 2003 - 18:28:09 CDT

Original text of this message

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