Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01722: invalid number, range from 9999999,000 to 0,0000013

metalrayMar 20 2015 — edited Mar 20 2015

Hi,

I struggle with the invalid number error. There are no non numeric characters in the result set (a few thousand rows).

Exporting into MS Excel and looking at all possible values for that column I can´t find non-numeric either but noticed

that the range of data is between 9999999,000 and 0,0000013 I am wondering if the many zero´s are indeed looking very un-numeric to Oracle.

I admit, the number format is bad.

Now... how do i solve that?

The error for the following is: Error: ORA-01481: invalid number format model

select 'small number' from dual where to_number(0,0000013) < 1;

Error: ORA-01722: invalid number

select 'big number' from dual where to_number(9999999,0) > 1

select 'big number' from dual where to_number(9999999,000) > 1

The problem is the comma instead of the period but I cant find a sensible number format that matches

my highest and lowest values.

Example:

SELECT to_number(0.0000013,'9999999999S', 'NLS_NUMERIC_CHARACTERS = '',.''') FROM DUAL

Can someone help me with the number formatting?

This post has been answered by metalray on Mar 20 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 17 2015
Added on Mar 20 2015
12 comments
1,284 views