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 -> Conversion from string to number with a default value

Conversion from string to number with a default value

From: Chandresh Prakash <chandreshprakash_at_hotpop.com>
Date: 28 May 2004 10:57:08 -0700
Message-ID: <476b13c7.0405280957.491b988@posting.google.com>


Hi,
 Does anyone know an sql function to convert a string to a number and if the  string is not a number then converting to a default numeric value in Oracle.  For example, something like to_number('234',-1) = 234 and  to_number('34a',-1) = -1.

Thanks in advance,
 Chandresh Received on Fri May 28 2004 - 12:57:08 CDT

Original text of this message

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