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: How to spool to file with date in name

Re: How to spool to file with date in name

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Sun, 5 Sep 2004 09:22:56 -0400
Message-ID: <hsmdnSl2WderjqbcRVn-tQ@comcast.com>

"Sybrand Bakker" <gooiditweg_at_sybrandb.verwijderdit.demon.nl> wrote in message news:oq9lj0hba32hgtfccoagpimcbid0j2fq26_at_4ax.com...
| On Sun, 05 Sep 2004 04:38:30 GMT, "Randy Harris" <randy_at_SpamFree.com>
| wrote:
|
| >I'd like to run a SQL from a cron and spool the output to a file with the
| >sysdate in the name to make it unique. Someone please tell me how to do
| >that.
| >
|
|
| column dt new_value _dt
| select to_char(sysdate,'yymmdd') dt
| from dual
| /
| spool file&_dt
|
|
| --
| Sybrand Bakker, Senior Oracle DBA

or use UNIX scripting to generate the file name and pass it as a SQL script parameter, or pass the entire script as a UNIX shell 'here' document

++ mcs Received on Sun Sep 05 2004 - 08:22:56 CDT

Original text of this message

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