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: Gotta Be Simple PL/SQL

Re: Gotta Be Simple PL/SQL

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Fri, 30 Apr 2004 22:42:05 +0200
Message-ID: <4092ba8d$0$13078$636a15ce@news.free.fr>

"Joe" <heltibrand_at_NO_SPAMkarpel.com> a écrit dans le message de news:1095b1858dp2465_at_corp.supernews.com...
> Hi all
>
> OK, I feel embarresed.
>
> What is the simplest way to pick a number out of a string, i.e. 'Bill is
> 35 today' should return 35. I'm thinking some combination of substr and
> instr.
>
> Any thoughts? Any nice thoughts, at least?
>
> Joe
>
>

SQL> l
  1 select
  2 translate('Bill is 35 today',
  3 '0ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz','0')   4* from dual
SQL> / TRANS



  35

1 row selected.

Regards
Michel Cadot Received on Fri Apr 30 2004 - 15:42:05 CDT

Original text of this message

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