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 -> Help with a Script

Help with a Script

From: KJPhilbr13 <kjphilbr13_at_aol.com>
Date: 1996/12/26
Message-ID: <19961226151800.KAA21575@ladder01.news.aol.com>#1/1

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

Original text of this message

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