Select FOR UPDATE With ANSI Join Query Get ORA-02014 After Setting _COMPLEX_VIEW_MERGING=FALSE (Doc ID 1102853.1)

Last updated on OCTOBER 09, 2016

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.4 and later
Information in this document applies to any platform.
***Checked for relevance on 10-Oct-2016***

Symptoms

After setting _COMPLEX_VIEW_MERGING=FALSE the following sample SQL statement which does not contain any views fails with "ORA-02014: cannot select FOR UPDATE from view with DISTINCT, GROUP BY, etc".

select t1.key_col
from tab1 t1
inner join tab2 t2
on t1.key_col = t2.key_col
left outer join tab3 t3
on t1.key_col = t3.key_col
order by t1.key_col
for update of t1.data_col nowait;

SELECT t1.key_col
*
ERROR at line 1:
ORA-02014: cannot select FOR UPDATE from view with DISTINCT, GROUP BY, etc.

Changes

Set _COMPLEX_VIEW_MERGING=FALSE

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms