Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL*PLUS and placing sysdate in spool filename
>>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
![]() |
![]() |