Subject: Re: SQL*Plus spooling problem
References: <01bc1779$56ebb1e0$>

"Greg Grooms"  writes:

>I'm spooling data from a select statement to a file in SQL*Plus on an old
>Oracle 5 database (not my database!).  The problem is with too many rows in
>the data file.  The data looks OK, but the select count(*) and the wc on
>the file never match.  Why would Oracle split up each row into multiple
>rows in the file?  

>I have tried:

>	select a, b, c from table1
>	select * from table1
>	select a||b||c from table1

>None work as I expect...1 line per row of data.

>Any ideas?



This problem will occur not only in Oracle 5, but in 6 and 7 as well. What
is happening is once your line in the output exceeds 80 characters (the
default), Oracle will chop it into another line, adding a carriage return.
To fix this, set the linesize larger. For example,


Do this in SQL*Plus before the select statement. Simply make the linesize
as large as you need.

-Ari Kaplan
Independent Oracle DBA Consultant

<-> Visit my Web Page:                          <->
<->             email:                    <->

Back to Ari Kaplan's Home Page tm">Back to Ari Kaplan's Home Page