Oracle spool 用法

set heading off
set term off
set feedback off
set verify off
set trimout off
set echo off
set pagesize 0
set wrap off
set linesize 500
set trimout on
set trimspool on;
spool /data2/forExt/FileToMysql/p2pdown/rpt_p2pdown_hourly.&1
select  to_char(thedate,'yyyymmddhh24')||','||
         context
from    rpt_a_hourly
where   to_char(thedate,'yyyymmddhh24')='&1'
;
spool out;

你可能感兴趣的:(Oracle spool 用法)