Creating a spool file with date/time appended to file name
216066Aug 16 2002 — edited Aug 16 2002In Oracle Sql*Plus, I want to spool out a file, with the date-time stamp as part of the file name. Any idea how to do this?
Here's what I have right now:
SQL>
set serveroutput on size 200000;
rem
rem $OFSA is a UNIX alias so sql plus is talking to UNIX
rem
spool $OFSA/logs/OFSAP/common_coa_id.log;
prompt 'Enter date in mmddyyyy format, without quotes';
exec upd_common_coa_id_driver ('&date_mmddyyyy');
spool off;
As an example, I'd like to have a file with this name: common_coa_id083002.log
Thanks.