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

Home -> Community -> Usenet -> c.d.o.server -> Re: Spooling variable length records

Re: Spooling variable length records

From: Jurij Modic <jurij.modic_at_mf.sigov.mail.si>
Date: 1998/01/22
Message-ID: <34c7b58c.10964489@www.sigov.si>#1/1

On Thu, 22 Jan 1998 16:29:13 -0000, jselby_at_cams.co.uk (Jason Selby) wrote:

>Here's the thing, I have an aplication which needs to output variable length
>ASCII text files from ORACLE tables.
>
>To do this I use SQLPLUS and have a script which does something like
>
>set heading off
>set feedback off
>etc
>set linesize 200
>spool file1.txt
>select field1||'|'||field2 etc..
>from tab1;
>spool off
>
>My problem is that most of the files I create have variable length records
>which means that each record has a load of trailing spaces on it. This has to
>be stripped off by a seperate routine.
>
>Is there any way to get ORACLE to output an ASCII file and trim off extra
>spaces at the same time.
>

In SQL*Plus 3.3 you can use SET TRIMSPOOL ON to trim trailing spaces. I don't know if it's available also in rel.3.2, but it definitively isn't in release 3.1.

>Many thanks
>
>Jason

Regards,


Jurij Modic                             Republic of Slovenia
jurij.modic_at_mf.sigov.mail.si		Ministry of Finance
============================================================
The above opinions are mine and do not represent any official standpoints of my employer Received on Thu Jan 22 1998 - 00:00:00 CST

Original text of this message

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