Re: VARCHAR to NUMBER

From: Neville Sweet <sweet.neville.nj_at_bhp_xxx_.com.au>
Date: Tue, 6 Feb 2001 15:00:07 +1100
Message-ID: <95nsha$b05$1_at_gossamer.itmel.bhp.com.au>


Hi Marc,

You could use Translate, eg.
SELECT TRANSLATE('X -123b',
[Quoted] '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -+~!_at_etc', '0123456789') "Num" FROM DUAL

Marc Ottone wrote in message <3a7eee26_at_news.unige.ch>...
>Hi,
>
>In order to select data (block based on table) I need to get NUMERIC value
>from VARCHAR
>like 'X -123b' = 123
>and use criteria like >100 and <200
>What would be the simple way to do this?
>[FORMS 6i / Rdb 7]
>TIA,
>
>Marc
>
>PS:
>TO_NUMBER generate -01722: Invalid number error
Received on Tue Feb 06 2001 - 05:00:07 CET

Original text of this message