(8.4.0)
https://xyk.hatenadiary.org/entry/20110207/1297045517
pager cat >> LOG_$(date "+%Y%m%d").log
select now();
nopager
(23c)
https://www.shift-the-oracle.com/sqlplus/command/spool.html
column d new_value d2 noprint
select to_char(sysdate,'yyyymmdd') d from dual;
spool LOG_&d2..log
select systimestamp;
spool off
(16)
https://qiita.com/noborus/items/f2954c4767ebcb5e52a4
select 'LOG_' || to_char(clock_timestamp(),'YYYYMMDD') || '.log' d;
\gset
\o :d
select now();
\o
(2022)
$d = "LOG_" + (Get-Date -Format "yyyyMMddH" ) + ".log"
sqlcmd -o $d