Cause: The attempted conversion of a character string to a number failed because the character string was not a valid numeric literal. Only numeric fields or character fields containing numeric data may be used in arithmetic functions or expressions. Only numeric fields may be added to or subtracted from dates.
Action: Check the character strings in the function or expression. Check that they contain only numbers, a sign, a decimal point, and the character “E” or “e” and retry the operation.
Basically, Oracle ORA-01722 is thrown because a particular string was not able to be converted into a specific valid number when a user attempted to convert a character string.
There are several possible situations to ORA-01722 error. Following are the tips for troubleshooting:
Pay attention to the numeric value and column. However ORA-01722 error can also happen in situation where there is no numeric value involved.
When doing an ” INSERT INTO … VALUES (…) ” find out which data item is invalid. Check the column type and make sure the data being inserted matches the column type.
If you are trying to supply the values in a sub query which is intended to INSERT or UPDATE, you have to dig a little beeper because the character that is throwing ORA-01722 is actually hidden. You would then need to find the row that contains a non-numeric string.
When doing a SELECT, rather than an INSERT or UPDATE, ORA-01722 is thrown most likely because of some implicit conversation in WHERE. Check for a numeric column being compared to a character column.
smallwei 9:22 pm on October 26, 2009
The official explanation from Oracle is:
Basically, Oracle ORA-01722 is thrown because a particular string was not able to be converted into a specific valid number when a user attempted to convert a character string.
There are several possible situations to ORA-01722 error. Following are the tips for troubleshooting: