Removing SQL Query from spooled file

Your settings are fine. The last step is to split the spool and select statements into another script, as follows:

SET head OFF;
SET feed OFF;
SET trimspool ON;
SET linesize 32767;
SET pagesize 32767;
SET echo OFF;
SET termout OFF;
SET verify OFF;
SET NEWPAGE NONE;
@test.sql

The file "test.sql" will contain the following lines:
SPOOL filename.csv;
SELECT * from table;
SPOOL OFF;

HTH,
Martin

posted @ 2020-04-13 14:43  kakaisgood  阅读(149)  评论(0编辑  收藏  举报