Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Can someone clarify something on TAHITI for me? - re MVs

Re: Can someone clarify something on TAHITI for me? - re MVs

From: Mladen Gogala <mgogala.spam-me-not_at_verizon.net>
Date: Thu, 12 Oct 2006 07:37:37 GMT
Message-Id: <pan.2006.10.12.07.37.37.390802@verizon.net>


On Wed, 11 Oct 2006 10:05:09 -0700, BD wrote:

> CREATE MATERIALIZED VIEW TEST_MV
> TABLESPACE TS1
> BUILD IMMEDIATE
> USING INDEX
> TABLESPACE TS2
> REFRESH FORCE ON DEMAND WITH PRIMARY KEY (PK_VALUE) AS
> SELECT * FROM SCHEMA.MASTER_TABLE_at_DBLINK
> NOLOGGING;
>
> The error asterisk is right at the opening paren of PK_VALUE, and the
> error is "ERROR at line 1:
> ORA-00905: missing keyword"

You don't need "(PK_VALUE)". What you're trying to do is to tell oracle to use primary key instead of rowid during refresh. Oracle will be quite capable of finding out about the columns that comprise the primary key. This is your SQL:
CREATE MATERIALIZED VIEW TEST_MV

 	TABLESPACE TS1
 	BUILD IMMEDIATE
 	USING INDEX
 		TABLESPACE TS2
 	REFRESH FORCE ON DEMAND WITH PRIMARY KEY AS
 		SELECT * FROM SCHEMA.MASTER_TABLE_at_DBLINK
 	NOLOGGING;
-- 
http://www.mladen-gogala.com
Received on Thu Oct 12 2006 - 02:37:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US