I've got a SQL script that is executed through a UNIX ksh script. It is working fine, but I wanted to add a line to put a date/time stamp in the log file that it generates.
This is more of a SQL question, but I'm hoping someone can help me get the date/time...I've changed the script with the bold statement below to find the sysdate, but for some reason, it is displayed twice in the log file. And I don't know how to find the time...
DEFINE LOG_DIR=&1
SPOOL &&LOG_DIR/tf_tbl_daily.log
ALTER SYSTEM FLUSH SHARED_POOL
/
TRUNCATE TABLE tf_tbl;
select sysdate from dual;
/
SPOOL OFF
EXIT