Re: sqlplus csv column headings

From: joel garry <>
Date: Thu, 17 Jan 2008 13:34:25 -0800 (PST)
Message-ID: <>

On Jan 17, 6:35 am, wrote:
> Hello,
> I am
> trying to generate csv file from the output of a sqlplus.
> 9i on unix.
> Dome quite well so far.
> spool wed.csv
> set colsep |
> set heading off
> set feedback off
> set linesize 4000
> set trimspool on
> set pagesize 0
> That colsep command is really useful BTW.
> Anyhow know how can I get the column heads just once?
> J

Another way is to run another spool without pagesize 0 and a where clause that won't get rows, and put the two files together. If you know the number of lines is less than the maximum allowable pagesize, you could set pagesize to the number of rows+number of heading lines.

In my experience, having data with delimiters in it usually causes a lot more work no matter how you do it.


-- is bogus.
"Never fly in the same cockpit with someone braver than you."
Received on Thu Jan 17 2008 - 15:34:25 CST

Original text of this message