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

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;