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: unix script

Re: unix script

From: Alan D. Mills <alanmNOSPAM_at_uk.europe.mcd.mot.com>
Date: Fri, 21 Aug 1998 14:22:29 +0100
Message-ID: <6rjs9r$el0$1@schbbs.mot.com>


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

Original text of this message

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