I have a query in the package throwing error
ORA-01722 : invalid number.
I tried many ways but no luck.
select h.column
from table1 h,table2 c
where c.created_date='17-MAY-17'
and nvl(c.acct_nmbr,0)=nvl(to_number(h.v_acct_num),0)
c.acct_nmbris ofNUMBER(19,0)h.v_acct_numis ofvarchar2(4000 byte)
Please suggest me the solution
Obviously
v_acct_numcolumn 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 withORA-01722 : invalid number. If you're sure about the data matches when non-numeric characters are extracted then useregexp_replace(t2.v_acct_num,'[^[:digit:]]')within the collation of thejoin'sonclause :Use
ANSI-92standard forJoin, andISO-8601standard fordatesyntaxes.