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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

to_number function and the "invalid number" error

CrusoeMar 23 2010 — edited Mar 23 2010
Dear all,

I have searched the forum for threads relating to the ORA-01722: invalid number error, could not find the answer I am looking for.

What I was trying to do was

select * from table1 where to_number(field1) > 1000

field1 is a varchar2 data type.

I tried all sorts of things i.e using fmt, nls params as defined in the documentation, nothing worked.

Though the practical problem was solved by

select * from table1 where field1 > '1000'

I would still like to know why this error occurs. Can someone help ?

Regards

Crusoe
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 20 2010
Added on Mar 23 2010
9 comments
5,843 views