Skip to content
Advertisement

ORA-01722- Invalid Number

I have a query in the package throwing error

ORA-01722 : invalid number.

I tried many ways but no luck.

  • c.acct_nmbr is of NUMBER(19,0)
  • h.v_acct_num is of varchar2(4000 byte)

Please suggest me the solution

Advertisement

Answer

Obviously v_acct_num column contains non-numeric values. to_number() function has restriction that the value in the argument shouldn’t contain any non-numeric character, otherwise the system hurls with ORA-01722 : invalid number. If you’re sure about the data matches when non-numeric characters are extracted then use regexp_replace(t2.v_acct_num,'[^[:digit:]]') within the collation of the join‘s on clause :

Use ANSI-92 standard for Join, and ISO-8601 standard for date syntaxes.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement