これはいつも忘れるのでメモっておく
sqlplusのCOLUMNコマンドでNEW_VALUE句を使えばよい
column spool_filename new_value spool_filename select user || '_' || to_char(sysdate, 'yyyymmdd_hh24miss') || '.log' spool_filename from dual; spool &spool_filename select sysdate from dual; spool off exit