Re: Testing for Numbers within Text

From: Graham Miller <lgmiller_at_elmrd.u-net.com>
Date: Sun, 01 Aug 1999 09:50:17 GMT
Message-ID: <37a4180a.15525664_at_news.u-net.com>


Hello Simon,

One way is to use the 'Translate' function:

if translate(v_char, '0123456789', '9999999999') = '9' then ...

graham  

On Sat, 31 Jul 1999 23:41:15 +0100, "Simon Hedges" <shedges_at_hhhh.freeserve.co.uk> wrote:

>Does anyone have any tips for checking with a specified character within a
>string
>is numeric or not?
>
>I guess I could do lots of nested 'ifs', (i.e. if v_character = '1' then...
>elsif v_character = '2' then... elsif... ) but I wondered if there was a
>more efficient and elegant solution.
>
>Any ideas?
>
>
>Simon Hedges
>Gloucester
>UK
>
Received on Sun Aug 01 1999 - 11:50:17 CEST

Original text of this message