Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Getting Unix environment variable from SQL or PL/SQL

Re: Getting Unix environment variable from SQL or PL/SQL

From: Si <s.fisher_at_bigfoot.com>
Date: Wed, 3 Feb 1999 20:17:08 -0000
Message-ID: <4h2u2.70$BK.167@wards>


or you could pass them in as positional parameters

e.g.

VAR1=ABC
VAR2=DEF sqlplus scott/tiger @testproc $VAR1 $VAR2

then in SQL

SELECT *
FROM test
WHERE test_col1 = &1
AND test_col2 = &2;

Hope this helps

Si

John P. Higgins wrote in message <36B66B03.740940FD_at_deere.com>...
>You need to make your SQL text into a unix 'here script'.
>VARIABLE=ABC
>export VARIABLE
>sqlplus -s <<EOF
>system/manager
>select .....where col = '$VARIABLE';
>EOF
>
>Maverick wrote:
>
>> Hi
>>
>> Does anyone know how to get Unix environment variables from SQL
>> or PL/SQL.
>>
>> Thank you in advance.
>>
>> Please send all comments to: mav_at_ghg.net
>
>
>
Received on Wed Feb 03 1999 - 14:17:08 CST

Original text of this message

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