Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Date and time in spool file name

569717Mar 29 2007 — edited Mar 29 2007
Hi,

can anyone show me how i can write the code below so that the spool file will automatically take the system time and date?

thanks again.


set term off;
set echo off;
set heading off;
set linesize 1500;
set pagesize 9999;
set feedback off;

spool /home/oracle/ATM_Upload/files/CRD000119MMDDYYHHMISS.DAT;

SELECT rec_ind||source_type||bbdsa_code||seq_num||dt_ti_ext||ver_num
as atm_header
FROM atm_dc_hd;

spool off;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 26 2007
Added on Mar 29 2007
3 comments
2,901 views