Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Shell script question
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
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
![]() |
![]() |