Re: VARCHAR to NUMBER

From: jun zhang <junzhang_at_bu.edu>
Date: 14 Feb 2001 17:27:15 GMT
Message-ID: <96ef5j$puk$1_at_news3.bu.edu>


Hi,

[Quoted] I have a very similar question,

[Quoted] in Oracle I am using sql like:

select r.page
[Quoted] from readerresponse_complete r
order by to_number(translate (r.page,'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', '0123456789')) asc

[Quoted] [Quoted] It works partially, for page 1a, 2b, it sort fine. But no way it can sort 12a, 12b, 12c

[Quoted] Any help will be appreciated.
Jun

[Quoted] [Quoted] Marc Ottone <marc.ottone_at_cjb.ville-ge.ch> wrote:

: 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 Wed Feb 14 2001 - 18:27:15 CET

Original text of this message