How to resolve ORA-01719 Error Message in Oracle database

Learn the motive and how to get to the bottom of the ORA-01719 error message in Oracle.

Description

When you encounter an ORA-01719 error, the following error message will appear:

ORA-01719: outer be part of operator (+) no longer allowed in operand of OR or IN

Cause

You tried to operate a outer be part of when the usage of an OR condition.

Resolution

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

Option #1

If you’ve got tried to use the OR circumstance with an outer join, you will want to re-write your SQL. You can strive the usage of a UNION ALL question to acquire the identical results.

For example, if you tried to execute the following SQL statement:

SELECT suppliers.*
FROM suppliers, orders
WHERE suppliers.supplier_id = orders.supplier_id(+)
OR supplier_name = 'IBM';

You would receive the following error message:

You could right this SQL announcement (and achieve the identical effect) with following:

SELECT suppliers.*
FROM suppliers, orders
WHERE suppliers.supplier_id = orders.supplier_id(+)
AND supplier_name <> 'IBM'
UNION ALL
SELECT suppliers.*
FROM suppliers
WHERE supplier_name = 'IBM';