Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-22818: subquery expressions not allowed here

User_51476Apr 16 2017 — edited Apr 17 2017

Hi Experts,

I am facing error ORA-22818: subquery expressions not allowed here while creating Materialized View

DB version used is 12.1.0.2.0

My query is like

CREATE MATERIALIZED VIEW schema_name.MVname

.

.

.

as

(select t1.c1,

     (select t2.c3 from t2 where t2.c2='ABC' and t1.c1=t2.c1),

       (select t3.c3 from t3 where t3.c3='EFG' and t1.c1=t3.c1),

         (select t3.c3 from t3 where t3.c3='XYZ' and t1.c1=t3.c1)

from t1

)

On google I can find its an issue since DB version 10.X

is it still an issue?

And DO I need to rewrite query with outer join or create MV based on View, which one is better option(for reporting purpose) between using outer join or MV based on View.

Please advice

Thanks

Saan

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 14 2017
Added on Apr 16 2017
2 comments
460 views