Home / Oracle Errors / ORA-01722

ORA-01722

Invalid number

What it means

Oracle tried to convert a non-numeric string to a number.

Common causes

How to fix it

  1. Find rows that are not numeric: SELECT col FROM t WHERE VALIDATE_CONVERSION(col AS NUMBER)=0; (12.2 and later)
  2. Use explicit conversion: TO_NUMBER(col) only on clean data, or compare as strings
  3. Fix datatypes so joined columns match

How to prevent it

Use correct data types and avoid implicit conversions.

Still stuck? Ask the community in Q&A.

Get the weekly Vismo digestNew Oracle articles and Q&A in your inbox. No spam.

One email a week. Unsubscribe any time.