sqlplus中利用spool生成带日期的文件名
col spf new_value spf noprint
select 'd:'||to_char(sysdate,'yyyymmdd')||'.txt' spf from dual;
spo &spf
select * from dual;
spo off;[@more@]
col spf new_value spf noprint
select 'd:'||to_char(sysdate,'yyyymmdd')||'.txt' spf from dual;
spo &spf
select * from dual;
spo off;[@more@]
--sqlplus中利用spool生成带日期的文件名
accept un prompt '用户名:'
accept pw prompt '密 码:' hide
accept db prompt '数据库:'
connect &un/&pw@&db;
pause 继续吗?
set feedback off
set pages 0
set lines 30000
set trims on
set trim on
set ver off
set heading off
set time off
set timing off
set autot off
set echo off
set show off
set term off
col spf new_value spf noprint
select 'd:'||to_char(sysdate,'yyyymmdd')||'.txt' spf from dual;
spo &spf
select * from dual;
spo off;
exit
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12402/viewspace-1010173/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/12402/viewspace-1010173/