Home » RDBMS Server » Server Administration » Re: How can i make a parametarize filename in spool?
Re: How can i make a parametarize filename in spool? [message #375115] Fri, 27 July 2001 08:57
Bala
Messages: 205
Registered: November 1999
Senior Member
Hi,

You can do it in scripts(shell or dos).
But you can do it with in sqlplus also....

for instance you want to add system date to the file name then

SQL> column mydate new_val thedate;
SQL> select sysdate as mydate from dual;
SQL> spool C:\...\filename&thedate.txt

or if you want to pass the file name interactively then

you can simply
SQL> spool C:\...\&filename

then during execution it will prompt you to enter
the file name.....

so basically you will use & to make it a variable.

Bala.
Previous Topic: Migrating SQL-Scripts from 8.0.5.X to 8i
Next Topic: Re: sql query
Goto Forum:
  


Current Time: Fri Jul 05 11:03:43 CDT 2024