*/
SET colsep ';'
SET TERMOUT OFF
SET NEWPAGE 0
SET SPACE 0
SET LINESIZE 800
SET PAGESIZE 0
SET ECHO OFF
SET FEEDBACK OFF
SET HEADING OFF
SET NUMW 20
column timecol new_value timestamp
column spool_extension new_value suffix
SELECT '.csv' spool_extension
FROM dual;
/
SPOOL \\SERVERNAME\FOLDER\FOLDER\FOLDER...ETC\InternationalReport&&suffix
@@"C:\FOLDER\FOLDER\International_report\International";
/
Exit;
目前,它将假脱机 .csv 文件,但我需要它输出 InternationalReportyyyymmdd.csv
关于如何设置它的任何想法?谢谢!
SELECT TO_CHAR(SYSDATE,'YYYYMMDDHH24MISS')||'.csv' spool_extension -- 添加TO_CHAR(SYSDATE,'YYYYMMDDHH24MISS')后问题解决
希望这可以帮助正在寻找解决方案的其他人