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: Lost last space

Re: Lost last space

From: astalavista <nobody_at_nowhere.com>
Date: Sat, 10 Nov 2007 10:42:31 +0100
Message-ID: <47357cfb$0$12475$426a74cc@news.free.fr>


OK thanks ...

"Mark D Powell" <Mark.Powell_at_eds.com> a écrit dans le message de news: 1194566305.649460.163760_at_v23g2000prn.googlegroups.com...

> On Nov 8, 5:09 pm, gazzag <gar..._at_jamms.org> wrote:

>> On 8 Nov, 20:13, "astalavista" <nob..._at_nowhere.com> wrote:
>>
>>
>>
>>
>>
>> > Hi,
>>
>> > I have a table with the last column
>> > with only one space
>> > I try to generate a CSV
>>
>> > set colsep '$'
>> > set linesize 500
>> > => a lot of space at the end of record
>> > set trimspool on
>> > => no space at the end of a record
>>
>> > How can I get a CSV
>> > with exactly one space at the end of a record ?
>> > (as it is in the table)
>>
>> > Thanks for your help
>>
>> I've just re-read your post. CSV stands for Comma Separated Values.
>> i.e. Each field is delimited by a comma (","). Do I understand you
>> correctly?
>>
>> -g- Hide quoted text -
>>
>> - Show quoted text -
>
> Since a trimspool will remove all trailing spaces including the one
> you want how about using case or decode to write out a constant to
> represent the space then feed the output into sed or another utility
> or script to replace the single constant in the last position of a
> line with a space.
>
> Note if you will be using sqlldr to reload this file into another
> Oracle db you can use the sqlldr control file to perform the
> substitution of space for the constant.
>
> HTH -- Mark D Powell --
>
>
> 
Received on Sat Nov 10 2007 - 03:42:31 CST

Original text of this message

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