Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to trim off text
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