Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Question: why do I get two extra empty lines between each selected row?

Re: Question: why do I get two extra empty lines between each selected row?

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: 2000/06/03
Message-ID: <8hbq6m$vsj$1@nnrp1.deja.com>#1/1

In article <8h97bc$9e7$1_at_nnrp1.deja.com>,   gmei_at_my-deja.com wrote:
> Hi:
>
> I am try to write some data out from an oracle db to a text file. When
> I run the code sql worksheet, everything works fine. But when I run it
> in sql/plus I always got two extra empty lines between each selected
> rows. I am curious why it happened. The total length of each selected
> row is 1840 bytes. The two extra "empty" lines also both are 1840
 bytes.
>
> Here is the code:
> -----
> set heading off feedback off verify off pause off
> set pagesize 0
> set linesize 1840
> set colsep '' -- so that there is no column separator. default is a
> single space
>

add

set trimspool on

else each line will be exactly 1,840 bytes long -- thats what is happening here...

> spool e:\GuangMei_work\product_out.txt;
>
> Select
> SKU
> ,HPXPRODUCT.SHORTNAME
> ,HPXMANUFACTURER.SHORTNAME
> ,HPXCATEGORY.SHORTNAME
> ,UPCCode
> ,UOM
> ,TYPECODE
> ,kosher_info.LONGNAME
> ,BRAND
> ,PACKAGING
> ,ITEMSIZE
> ,AVGWEIGHT
> ,VISIBLE
> ,HIGHFIBER
> ,VALUEPACK
> ,SPECIALORDER
> ,HOUSECHEFENDORSED
> ,HOUSEBRAND
> ,SEASONAL
> ,HOLIDAY
> ,ORGANIC
> ,RIPE
> ,VEGETARIAN
> ,VEGAN
> ,MACROBIOTIC
> ,NOFAT
> ,LOWFAT
> ,HEARTHEALTHY
> ,NOSUGAR
> ,LOWSUGAR
> ,NOSALT
> ,LOWSALT
> ,LOWCHOLESTEROL
> ,LOWCALORIE
> ,ASPARTAMEFREE
> ,SACCHARINFREE
> ,DAIRYFREE
> ,EGGFREE
> ,PEANUTFREE
> ,WHEATFREE
> ,GLUTENFREE
> ,SOYFREE
> ,PHENYLALANINEFREE
> ,CALORIES
> ,FATCONTENT
> ,SODIUMCONTENT
> ,SUGARCONTENT
> ,CHOLESTEROLCONTENT
> ,PROTEINCONTENT
> ,HPXPRODUCT.LONGNAME
> ,MESSAGETEXT
> ,INGREDIENTS
> from HPXPRODUCT,
> HPXMANUFACTURER,
> HPXUPC,
> HPXUOMCode,
> HPXProductCategory,
> HPXCategory,
> Kosher_info
> where HPXPRODUCT.MANUFACTURERID = HPXMANUFACTURER.MANUFACTURERID
> and HPXPRODUCT.ProductID = HPXUPC.ProductID
> and HPXPRODUCT.UOMID = HPXUOMCode.UOMID
> and HPXPRODUCT.ProductID = HPXProductCategory.ProductID
> and HPXProductCategory.CategoryID = HPXCategory.CategoryID
> and HPXPRODUCT.Kosher = Kosher_info.KOSHER_CODE_NUMBER
> and rownum<4
> order by HPXPRODUCT.sku;
>
> spool off;
> -------------------
>
> -- The spooled result, sorry for the empty lines taking spaces here:
>

[snip]

> Anybody has any suggestions?
>
> Thanks.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

--
Thomas Kyte (tkyte_at_us.oracle.com) Oracle Service Industries
Howtos and such: http://osi.oracle.com/~tkyte/index.html
Oracle Magazine: http://www.oracle.com/oramag
Opinions are mine and do not necessarily reflect those of Oracle Corp


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Sat Jun 03 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US