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

Home -> Community -> Usenet -> c.d.o.misc -> Re: create materialized view

Re: create materialized view

From: Tomasz Majchrzak <tomekem_at_poczta.fm>
Date: Thu, 10 Feb 2005 13:07:14 +0100
Message-ID: <pan.2005.02.10.12.07.14.269975@poczta.fm>


> I'm trying to build a materialized view in
> order to import daily data from another DB
>
> CREATE MATERIALIZED VIEW VW_LINKS_155
> BUILD IMMEDIATE
> REFRESH FAST NEXT sysdate + 1
> AS SELECT * FROM VW_LINKS_155_at_snap_dblink
>
> The matter is that Oracle complains that VW_LINKS_155_at_snap_dblink (a
> remote view accessed via snap_dblink ) doesn't have a PK constraint.

As far as I know it is not possible to impose primary key constraint on view. I don't know if it is possible to make materialized view on view, maybe you can set it only on table.

Try creating materialized view with ROWID treated as primary key:

CREATE MATERIALIZED VIEW
WITH ROWID
AS SELECT ... Tomek Received on Thu Feb 10 2005 - 06:07:14 CST

Original text of this message

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