Re: String manipulation

From: Vigi98 <vigi98_at_my-deja.com>
Date: Fri, 07 Sep 2001 17:07:50 GMT
Message-ID: <G97m7.4441$zf2.4971548_at_nnrp4.proxad.net>


Merci :-)

"Michel Cadot" <micadot_at_netcourrier.com> wrote in message news:9n7a8u$3iq$1_at_s1.read.news.oleane.net...
>
> "Vigi98" <vigi98_at_my-deja.com> a écrit dans le message news:
> Yxtl7.3479$lf2.3949710_at_nnrp5.proxad.net...
> > Hi all,
> >
> > Does anybody know if there are basic string manipulation procedures in
> > PL/SQL ? My problem is quite simple : I have several strings like totoN
> > where toto is always the same string and N a number which changes (eg :
> > azerty1, azerty23, azerty4,...)
> >
> > I want to extract the N max of all these strings.
> >
> > Any idea ?
> >
> > Thanks in advance.
> >
>
> v815> create table t (col varchar2(20));
>
> Table created.
>
> v815> select * from t order by col;
>
> COL
> --------------------
> toto1
> toto2
> toto23
> toto3
>
> 4 rows selected.
>
> v815> select max(translate(col,' abcdefghijklmnopqrstuvwxyz',' ')) from t;
>
> MAX(TRANSLATE(COL,'A
> --------------------
> 3
>
> 1 row selected.
>
> v815> select max(to_number(translate(col,' abcdefghijklmnopqrstuvwxyz','
'))) from t;
>
> MAX(TO_NUMBER(TRANSLATE(COL,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','')))
> --------------------------------------------------------------
> 23
>
> 1 row selected.
>
> --
> Hope this helps
> Michel
>
>
>
>
Received on Fri Sep 07 2001 - 19:07:50 CEST

Original text of this message