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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Parameter to teh spool command

RE: Parameter to teh spool command

From: <ddorr.cs_at_clearstream.com>
Date: Tue, 30 May 2000 18:22:52 +0200
Message-Id: <10513.107124@fatcity.com>


There are several options :

$ is for referencing variables in the shell, so, if you want to keep $, you can have a shell script, generating sql scripts, the substitution of your $1 being performed at the shell level,

or, you can try to use &var ( or &&var) which is the variable substitution mechanism in sqlplus.

> ----------
> From: Witold Iwaniec[SMTP:wiwaniec_at_novalistech.com]
> Reply To: ORACLE-L_at_fatcity.com
> Sent: Tuesday, May 30, 2000 16:16
> To: Multiple recipients of list ORACLE-L
> Subject: Parameter to teh spool command
>
> Hi all
>
> I guess it is very simple but I must be missing something...
>
> I would like to use a parameter for the spool filename so that I can
> run my script number of times and keep all spool files.
> But using:
>
> spool $1.log
> (or spool %1.log in Windows)
> does not do it.
>
> Can I do it in the sql script or do I have to go for other tools to
> generate the file name and open it?
>
> Regards
>
> Witold
> ======================================
> Witold Iwaniec
> Senior Software Developer
> NovaLIS Technologies
> wiwaniec_at_novalistech.com
> http://www.novalistech.com
> --
> Author: Witold Iwaniec
> INET: wiwaniec_at_novalistech.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
Received on Tue May 30 2000 - 11:22:52 CDT

Original text of this message

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