Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Help with a Script
I want to be able to run a script that creates a Spool file that has (Sysdate - 1) in "YYYYMMDD" format in the filename. For example:
DEFINE varSpoolFileName = 'c:\spool\data\sp'||(SysDate - 1)||'.dat'
spool &varSpoolFileName
Select * from employees
/
spool off
I know this does NOT work...How can I get the date in that format to be substituted into the string? I tried NEW_VALUE and Select TO_CHAR(SYSDATE - 1, 'YYYYMMDD') From DUAL...The results of the Select don't seem to be understood in the concatentation to varSpoolFileName....
Anyone with any ideas, please email me at KJPhilbr13_at_aol.com
Thanks in advance... Received on Thu Dec 26 1996 - 00:00:00 CST