Re: HOWDOI: Output Variable Length Fields (Re: rtrim not triming)

From: Carlos Pereyra <carlosp_at_wni.com>
Date: 1997/01/31
Message-ID: <32F29392.7951_at_wni.com>#1/1


Eric M. Gamble wrote:
>
> I have tried everything from RTRIM to selecting the SUBSTR of the LENGTH to
> achieve the following output:
>
> 10~FIELD2~~SOME TEXT
> 101~FIELD2~EXTRA INFO~SOME MORE TEXT
> 1~FIELD2~INFO~LITTLE TEXT
>
> I keep getting:
>
> 10 FIELD2 SOME TEXT
> 101 FIELD2 EXTRA INFO SOME MORE TEXT
> 1 FIELD2 INFO LITTLE TEXT
>
> I do not what fixed length records. I need variable length records. How
> do I do this?
Eric:

This probably works (at least on Sybase)

select "10" + ltrim(rtrim(field2)) + "some text that I put in" + ....

I am not sure that is what you are looking for, if it isn't, describe the output in detail and someone here should be able to help you.

Carlos Pereyra Received on Fri Jan 31 1997 - 00:00:00 CET

Original text of this message