fsdotnet

Oracle Error Codes

.NET & Data

runs locally

ORA codes, and what actually causes them

Oracle error messages name the symptom, not the cause. ORA-01722 says "invalid number", which is true and unhelpful: the real question is which column, and why a string reached it. This list pairs each code with the situation that produces it in practice, so you can start from the likely cause instead of the message.

It searches on the code, the message text and the cause, so a half-remembered fragment is enough — type "table or view" and you get ORA-00942, type 1795 and you get the expression limit. Codes are grouped by area (data, object, constraint, resource) because errors that look unrelated often come from the same place.

Why do I get ORA-01722 on a column that only holds numbers?

Almost always an implicit conversion: comparing a VARCHAR2 column to a number literal makes Oracle convert every row, and one row is not numeric. Compare against a string, or fix the column type.

What is the difference between ORA-00942 and ORA-01031?

Oracle reports "table or view does not exist" for objects you cannot see, whether or not they exist — hiding existence from unprivileged users. ORA-01031 means you can see the object but lack the specific privilege for the operation.