ora-00933 when create object materialized view
705578Jun 7 2009 — edited Jun 8 2009Hi, I am pretty new to Oracle.
I am creating a materialized view in my own schema using the ONLY key word:
-------- code ---
CREATE MATERIALIZED VIEW SYNDEVGMA1.ACCLDG_TAB_MV OF AccLdg_TYP
AS
SELECT * FROM ONLY SYNDEVGMA1.ACCLDG_TAB;
The DDL for the table and types are:
CREATE TABLE SYNDEVGMA1.AccLdg_TAB OF SYNDEVGMA1.AccLdg_TYP (ooid PRIMARY KEY);
-------------------------------
I get this ONLY keyword from this document:
http://stanford.edu/dept/itss/docs/oracle/10g/appdev.101/b10799/adobjdes.htm
which says:
-------
For both object-relational and object materialized views that are based on an object table, if the type of the master object table is not FINAL, the FROM clause in the materialized view definition query must include the ONLY keyword. For example:
CREATE MATERIALIZED VIEW customer OF cust_objtyp
AS SELECT CustNo FROM ONLY Scott.Customer_objtab@dbs1;
Otherwise, the FROM clause must omit the ONLY keyword.
-------
However, it's giving out errors, complaining sql syntax error:
ORA-00933: SQL command not properly ended
Can I have your help?