Adsense Ad

Wednesday 24 May 2017

Oracle: ORA-01468 Error Message

ORA-01468 Error Message

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

Description

When you encounter an ORA-01468 error, the following error message will appear:
  • ORA-01468: a predicate may reference only one outer-joined table

Cause

You tried to execute a SQL statement that joins two tables and both tables were outer joined. When joining two tables, only one of the tables can be outer joined.

Resolution

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

Option #1

Rewrite your SQL so that only one of the tables is an outer join table.
For example, if you had tried to execute the following SQL statement:
SELECT *
FROM suppliers, orders
WHERE suppliers.supplier_id(+) = orders.supplier_id(+);
You would receive the following error message:
Oracle PLSQL
You could correct this by SQL statement with either syntax:
Syntax #1:
SELECT *
FROM suppliers, orders
WHERE suppliers.supplier_id(+) = orders.supplier_id;
OR
Syntax #2:
SELECT *
FROM suppliers, orders
WHERE suppliers.supplier_id = orders.supplier_id(+);

No comments: