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: Shell script question

Re: Shell script question

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 02 Nov 1998 14:08:10 GMT
Message-ID: <363fbc97.2896955@192.86.155.100>


A copy of this was sent to nimrodo_at_my-dejanews.com (if that email address didn't require changing) On Mon, 02 Nov 1998 10:38:16 GMT, you wrote:

>Hi,
>
>I'm trying to call a stored procedure that resturn a value from a shell
>script. I tried something like:
>
>variable rc number
>exec myproc(:rc);
>exit rc
>
>but I can't use Exits that way.. Any idea how I can do that?
>
>Nimrod
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

Something like this will work:

variable rc number
exec :rc := 5
column foo new_value x
select :rc foo from dual;
exit &x

replace the exec :rc := 5 with your stored procedure call and then the select from dual will get the value of :rc into a macro substitution variable which exit will use...  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Mon Nov 02 1998 - 08:08:10 CST

Original text of this message

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