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: Use environment variable in SQLPlus on Windows

Re: Use environment variable in SQLPlus on Windows

From: joel garry <joel-garry_at_home.com>
Date: 26 Jan 2007 14:02:26 -0800
Message-ID: <1169848946.047459.169880@l53g2000cwa.googlegroups.com>

On Jan 25, 12:04 pm, "Gerard H. Pille" <g..._at_skynet.be> wrote:
> 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.
>

I just tried it and it worked.

> Stick to Linux.

Rather stick to a real unix, but there you go.

jg

--
@home.com is bogus.
http://lists.village.virginia.edu/lists_archive/Humanist/v20/0080.html
Received on Fri Jan 26 2007 - 16:02:26 CST

Original text of this message

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