Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Use environment variable in SQLPlus on Windows
"Gerard H. Pille" <ghp_at_skynet.be> wrote in message
news:45b90beb$0$15378$ba620e4c_at_news.skynet.be...
> Matthias Langbein wrote:
>> Hi all,
>> is there a way to use a environment variable in SQL PLus? On Linux I
>> can use the $, but on Windows this doesn't work.
>>
>> Example:
>>
>> C:\> SET SQLOUT=C:\LOG\
>> C:\> SQLPLUS scott/tiger
>>
>> SQL> SPOOL ${SQLOUT}TEST.LOG
>> SQL> PROMPT A
>> A
>> SQL> SPOOL OFF
>> SQL> EXIT
>>
>>
>> This saves me the Log file in the current directory with the file name
>> ${SQLOUT}TEST.LOG, but I want the log file with the name TEST.LOG
>> stored in the directore C:\LOG
>>
>> Any help??
>>
>> THX, Langi
>
> The normal syntax on Whinedoze is %SQLOUT%, but I didn't say this will
> work from within SQL*Plus.
>
> Stick to Linux.
>
> Gerard
Or use Cygwin.
-- SteveReceived on Thu Jan 25 2007 - 17:51:07 CST
![]() |
![]() |