Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: unix script
How about this:
your UNIX script calls SQL*Plus. Make the select retriee the values in the form of UNIX assignment statements, i.e.
SELECT 'export APPLES='||apples_col
, 'export BANANAS='||bananas_col
FROM TABLE
/
save the output to a file, withouth headings and feedback etc
then from later in your unix script, simply execute the saved output file (which is a unix script containing two variable assignments). You now have the values as variables in your UNIX script.
HTH
--
Alan D. Mills
jeff9580_at_my-dejanews.com wrote in message
<6rhnbc$ng7$1_at_nnrp1.dejanews.com>...
>I'm writing a Unix script that needs to use some values frorm Oracle as
>variables:
>
>I need to make Apples, Oranges, etc each it's own variable in the script.
Can
>I do this without writing 3 different select statements?
>
Received on Fri Aug 21 1998 - 08:22:29 CDT