removing first blank line in csv file

Thread Solved

Join Date: Jul 2009
Posts: 33
Reputation: axeeffect2002 is an unknown quantity at this point 
Solved Threads: 4
axeeffect2002 axeeffect2002 is offline Offline
Light Poster

removing first blank line in csv file

 
0
  #1
Sep 21st, 2009
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:-

  1. SET feedback off;
  2. spool output.csv;
  3. SET heading off;
  4. SELECT username||','||profession FROM users;
  5. 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
Add to my reputation if you think I really helped you. :)
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 2
Reputation: babyDBA is an unknown quantity at this point 
Solved Threads: 2
babyDBA babyDBA is offline Offline
Newbie Poster

Re: removing first blank line in csv file

 
0
  #2
Sep 23rd, 2009
You have to add command SET PAGESIZE 0 at the top script

  1. SET PAGESIZE 0 -- <-- add this line
  2.  
  3. SET FEEDBACK OFF
  4. SET HEADING OFF
  5.  
  6. SPOOL OUTPUT.TXT;
  7. SELECT username||','||profession FROM users;
  8. SPOOL OFF;
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC