ORA-01722: Invalid number
OracleWhat does it mean?
A character string that cannot be converted to a number was used where a numeric context is required. An implicit or explicit conversion failed.
Why does it happen?
Comparing a numeric column with text (e.g. WHERE num_col = 'ABC'), inserting a value containing letters into a numeric field, an unsuitable format for TO_NUMBER, or a decimal/group separator mismatch (comma vs period).
How to fix it
Find the expression with the failing conversion; usually a WHERE condition or an INSERT value. Ensure type compatibility in text/number comparisons and use explicit conversion where needed: TO_NUMBER(my_column) or TO_CHAR for the text side. Prevent non-numeric input into numeric columns at the application layer. Watch the NLS_NUMERIC_CHARACTERS setting.
More from this engine
- ORA-00018Maximum number of sessions exceeded
- ORA-28000The account is locked
- ORA-01578Oracle data block corrupted (file #, block #)
- ORA-02049Timeout: distributed transaction waiting for lock
- enq: TX - row lock contentionWait: session blocked on a row-level lock held by another transaction
- log file syncWait: session waiting for LGWR to flush redo to disk on commit
- db file sequential readWait: single-block physical read, typically an index or table lookup