Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01722: invalid number - uses wrong index

3613292Jan 4 2018 — edited Jan 15 2018

Hi,

We are getting ORA-01722: invalid number in an update query. The strange part is this issue occurs only first time after we have database export / import from Oracle11g to Oracle 12c.

Even after running gather stats on entire schema we see that oracle picks up an index & then throws this error as it tries to compare Number with varchar field. However after we analyze the tables involved in the query oracle picks up another index due to which records which were creating error are filtered out & the update query runs smooth.

We need to understand on how we can avoid issue on day 1 after export import without code change

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 12 2018
Added on Jan 4 2018
7 comments
589 views