Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Convert character string to number

Convert character string to number

From: Helmut Daiminger <hdaiminger_at_vivonet.com>
Date: Wed, 24 Jan 2001 16:42:36 -0800
Message-Id: <10751.127427@fatcity.com>


Hi!

I want to read a column (varchar2) from a table and convert the contents into numbers if the string consists of numbers only. If the string contains characters, I don't want to convert it.

Example for data in varchar2 colum:

row 1:   12345
row 2:   text
row 3:   123dfe
row 4:   9876432

I can easily conver row 1 and 4 using the to_number function, right? But how can I tell Oracle to skip rows 2 and 3 since the character field also contains characters not just numbers?

Any idea?

This is 8.1.6 on Win2k.

Thanks, Received on Wed Jan 24 2001 - 18:42:36 CST

Original text of this message

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