Link to home
Start Free TrialLog in
Avatar of camasuvi
camasuvi

asked on

ora-01722 invalid number

hi all,

I am currently installed an oracle with nls_lang setting to AMERICAN_AMERICA.WE8ISO8859P1 .  My computer regional seting is "English(United Kingdom)".

Sometimes but not always i get the following error:
ora-01722 invalid number

Is there any inonsistencies between these settings?
Any idea will be appreciated.
Thanks
Avatar of Jim Cakalic
Jim Cakalic
Flag of United States of America image

There are a variety of scenarios in which ORA-01722 can occur. Given that the two locales (UK and US) are identical with respect to the characters that make up a valid number (digits, decimal point, sign, 'E'/'e' for scientific notation) it is unlikely that this is the cause of your problem.

More likely, there really is 'bad data' somewhere that results in the conversion raising the error. The Oracle FAQ reviews a number of the possible scenarios and suggests a resolution strategy for each. Review this if you haven't already done so.
    http://www.orafaq.com/error/ora-01722.htm

Best regards,
Jim Cakalic
Avatar of satyesh
satyesh

>> if u r trying to update an oracle table, thru JDBC...    
>>> if u r trying to update a numerical value in the table using preparedstatement, make sure you are a compatible corresponding java object to update.
   column type java.sql.Types.NUMERIC -- use java.lang.BigDecimal
   column type java.sql.Types.INTEGER -- use java.lang.Integer
   column type java.sql.Types.BIGINT -- use java.lang.Long
   column type java.sql.Types.TINYINT -- use java.lang.Byte
   for SMALLINT -- java.lang.Short
   for REAL -- java.lang.Float
   for FLOAT -- java.lang.Float
   for DOUBLE -- java.lang.Double
     
Hi, camasuvi. Do you need more assistance with this question?
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- PAQ'ed and points NOT refunded

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

vemul
Cleanup Volunteer
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

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