Re: Help: Blank spaces

From: Angelo Cavallaro <angelo.cavallaro_at_pcm.bosch.de>
Date: Wed, 03 Feb 1999 12:49:22 +0100
Message-ID: <36B837C2.69B2_at_pcm.bosch.de>


[Quoted] Hi Jaime,

in pure SQL u could use the following statement:

select
replace(

        translate(
                  replace(
                          replace('This    is    a  String','
',chr(0)||chr(1))
                          ,chr(1)||chr(0),chr(2))
                  ,'x'||chr(2),'x')
        ,chr(0)||chr(1),' ')

from dual;

chr(0), chr(1) and chr(2) are not inputable (by the user) characters. 'x' is a dummy character, cause u need at least one substitution character in TRANSLATE, chr(2) is substituted by NULL.

HTH Angelito.

Jaime F. Bermudez wrote:
>
> Is there a way to remove extra blank spaces in a string? For example, I would
> like to convert "This is a String" into "This is a string".
>
> Thank you,
>
> Jaime F. Bermudez
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Wed Feb 03 1999 - 12:49:22 CET

Original text of this message