Link to home
Start Free TrialLog in
Avatar of nike_golf
nike_golfFlag for Afghanistan

asked on

Print line in Spool file...

I'm trying to write a batch file to execute some sql in sqlplus that will generate a flat file. I would like to be able to insert a couple of lines of text at the beginning of the file but am having a problem finding the correct way to do it, can someone help?

I'm trying to use dbms_output.put_line but fear I'm using it incorrectly...

 My sql script...

set feedback off
set verify off
set head off
set echo off
set linesize 30
set pages 0
set serveroutput on

spool W:\scripts\Wk1.csv

dbms_output.put_line('test');

SELECT * from table 1;

spool off
quit
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nike_golf

ASKER

Exactly what I needed.

Thanks for the quick reply.

NG,