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: SQL*PLUS and placing sysdate in spool filename

Re: SQL*PLUS and placing sysdate in spool filename

From: fumi <fumi__at_tpts5.seed.net.tw>
Date: 30 Jan 1999 03:46:33 GMT
Message-ID: <78tvap$ljb$1@news.seed.net.tw>

>>On 27 Jan 1999 19:36:56 GMT, "Pat Gorden-Ozgul" <gorden_at_xs.bis.bnl.gov>wrote:
>>>We run spool files in batch mode and would like to place the actual date
in
>>>the stored spool filename itself for auditing purposes.

Try this:

    column SpoolDate new_value SpoolDate noprint     select to_char(sysdate, 'YYYYMMDD') SpoolDate from dual;     spool &SpoolDate..lst

The spool filename, for example, will be 19990128.lst. Note that: there are 2 period in line 3, if you want to specify the file extension.
If you would like to use the default file extension, you can simply use "spool &SpoolDate" Received on Fri Jan 29 1999 - 21:46:33 CST

Original text of this message

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