0

Hi,
I have written a sql script which takes the rows from a table and writes it to
a .csv file.

The script is as follows:-

set feedback off;
 spool output.csv;
 set heading off;
 SELECT username||','||profession from users;
 spool off;

This works fine but output.csv contains a blank line at the top.
How can I get rid of that blank line?

Thanks in advance

2
Contributors
1
Reply
3
Views
8 Years
Discussion Span
Last Post by babyDBA
0

You have to add command SET PAGESIZE 0 at the top script

SET PAGESIZE 0       -- <-- add this line

SET FEEDBACK OFF
SET HEADING OFF

SPOOL OUTPUT.TXT;
SELECT username||','||profession FROM users;
SPOOL OFF;
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.