Link to home
Start Free TrialLog in
Avatar of mjfigur
mjfigur

asked on

Oracle Function to find where TO_NUMBER fails

I am trying to convert a column that is currently a VARCHAR2 into a number using TO_NUMBER, however of the 16,000+ rows there are just one or two that are not numbers and therefore causing the conversion to fail. I am new to functions. How could I write one or possible if Oracle already has one that could flag these individual accounts as 'Not Number'? Hope I explained it fully.
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Should add that you can tweak it to return a number 0 or 1 then add a where clause to your select:

Select col_val from table where isgood(col_val)=1;