Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-12054 when creating materialized view
Your select statement does not have any aggregation. Since this is a
single table MV, you at least need a count(*) in the select statement.
Ed Wong wrote:
> When creating a materialized view, I received "ORA-12054 : cannot set
> the ON COMMIT refresh attribute for the materialized view" error
> message.
>
> create materialized view target_mview
> tablespace target_data
> storage (pctincrease 0)
> build immediate
> refresh fast on commit
> enable query rewrite
> as select * from target
> where targetid = 100 and targetname = 'XYZ';
>
> ORA-12054: cannot set the ON COMMIT refresh attribute for the
> materialized view
>
> "target" is a physical table and the query is pretty simple so I have
> no idea why I get this error. I've granted "global query rewrite".
>
> I am using 8.1.7 EE on Sun Solaris. Please help. Thanks.
>
> ewong
Received on Thu Feb 06 2003 - 22:48:36 CST