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: how to trim off text

Re: how to trim off text

From: Yang <yg.yang_at_wanadoo.fr>
Date: Fri, 23 May 2003 23:21:55 +0200
Message-ID: <bam3dj$6d$1@news-reader12.wanadoo.fr>


try substr(your_column, 1, 3) if your column has fixed format.

"Susan Lam" <susana73_at_hotmail.com> a écrit dans le message de news: 7186ed56.0305231017.4fe5b68d_at_posting.google.com...
> I have a varchar2 column have data like below:
> 001
> 002
> 003-ABC
> 004-XYZ
> 005
>
> I would like to trim off everything after '-', resulting in
> 001,002,003,004,005. How do I do that? I tried rtrim but it looks
> like it can only trim off a fix value of text..
>
> Thanks in advance,
> Susan
Received on Fri May 23 2003 - 16:21:55 CDT

Original text of this message

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