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!

Received ORA-22818 subquery expressions not allowed here when creating mate

542845Oct 30 2006 — edited Oct 31 2006
Hello,

I was trying to create a materialized view to describe the referential integrity between the tables in my schema:

create materialized view user_references
tablespace tbspc
build immediate
using index
refresh complete on demand next sysdate + 1
as
select uic.table_name to_table, uic.column_name to_column,
ucc.table_name from_table, ucc.column_name from_column
from user_ind_columns uic, user_constraints uc, user_cons_columns ucc
where uic.index_name = uc.r_constraint_name
and uc.constraint_name = ucc.constraint_name
and uc.owner=upper('my_schema');

I was able to create this MV in Oracle 9.2. It failed with the following error when I ran it against Oracle 10.1:

from user_ind_columns uic, user_constraints uc, user_cons_columns ucc
*
ERROR at line 9:
ORA-22818: subquery expressions not allowed here

Is not allowing subqueries in MV a new restriction in Oracle 10? Is there a workaround?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 28 2006
Added on Oct 30 2006
1 comment
789 views