Adsense Ad

Tuesday, 23 May 2017

Oracle: ORA-01402 Error Message

ORA-01402 Error Message

Learn the cause and how to resolve the ORA-01402 error message in Oracle.

Description

When you encounter an ORA-01402 error, the following error message will appear:
  • ORA-01402: view WITH CHECK OPTION where-clause violation

Cause

You tried to INSERT or UPDATE a record in a view that contained a WITH CHECK OPTION. The resulting INSERT or UPDATE violates the WHERE clause of the view.

Resolution

The option(s) to resolve this Oracle error are:

Option #1

Try viewing the source code for the view, including the WHERE clause. You can then try to correct your original SQL statement.
If it is necessary to perform your original INSERT or UPDATE, try re-writing your SQL statement to access the underlying tables directly instead of using the view.

No comments: