Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Spooling without the whitespace
BVince2172 wrote:
> I'm trying to spool to a csv file, which I have managed to do, but I can't
> work out how to remove the extra white space in the columns. ie, my output
> looks like the following:
>
> 101,12-Dec-99, 190101,01-Jan-00, 29292,'monkey' , 90
>
> Should I be SETting something or setting something in the COLUMN
> definition, or something else altogether??
You are using SQL*Plus? That is a SQL*Plus formatting issue.
To my (little) knowledge of SQL*Plus formatting, it is not possible to set/output variable sized columns in SQL*Plus.
Why not use concat in the SQL statement instead? E.g.
SELECT
'"'||TRIM(col1)||'",'||TO_CHAR(num1,'999,990.00')|| ..etc..
FROM foobar
-- BillyReceived on Mon Aug 26 2002 - 03:43:16 CDT