2014-04-16 93 views
0

我創建了以下腳本(name.sql),然後從windows.bat文件調用它。後臺打印文件變得重複

問題是,創建的.xls文件有兩次來自SQL查詢的結果集。

我送你的腳本來幫助我udnerstnad我在.SQL腳本做錯了:

set linesize 999 verify off feedback off 
set markup html on entmap on spool on preformat off table 'align=right width=40% 
border=10 bordercolor=black bgcolor=white' 
set echo off pagesize 1000 linesize 255 feedback off heading on; 
set serveroutput off 

del "D:\weekly_orders.xls" 

SPOOL d:\weekly_orders1.xls 

select * from x where id='1-6A86P9C' order by x_date; 

/

SPOOL OFF; 

exit 

回答