Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help with a Script
Not the whole answer, but just a start:
column date_var noprint new_value yyyymmdd
select to_char(sysdate - 1, 'yyyymmdd') date_var from dual;
spool c:\spool\data\sp&&yyyymmdd
select....
spool off
after the &&yyyymmdd you can't put anything else unless you get the variable separator, which i never got to work on my system. hence your output will be scyyyymmdd.lst or whatever the default is ...
i've done this in unix. really!!!
HTH
janet
>
> 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'
>
Received on Thu Dec 26 1996 - 00:00:00 CST
![]() |
![]() |