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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Strange whitespace hard to trim off

Re: Strange whitespace hard to trim off

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 9 Jan 2003 05:40:33 -0800
Message-ID: <2687bb95.0301090540.6ef1d927@posting.google.com>


C Chang <cschang_at_maxinter.net> wrote in message news:<3E1CF430.2E7D_at_maxinter.net>...
> I have a record ( submitted by customer) as M123-1-9. When I count the
> length of it, it has 9 characters. I use -
> Select part , LENGTH(RTRIM(part)) p from ... to remove the whitespace
> off. However I still have 9 after the process. I have tried various
> chr() such as new-line, space, return character, none of them work. I
> tested with SUBSTR(part, 8,2) ||'*" and confirmed it to be a whitespace
> as 9 *. I just could not trim it off. Does anyone have a better
> suggestion?
> C Chang

The rtrim function defaults to space (blank) as the character to be trimmed. Use the DUMP function to see what the trailing characters are and then use RTRIM (other possibilites trim, replace, and transform) to eliminate them. See the SQL manual chapter on single row functions for the full syntax.

HTH -- Mark D Powell -- Received on Thu Jan 09 2003 - 07:40:33 CST

Original text of this message

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