Goodnight, I am having trouble creating a materialized view type primary key, the 2 tables have primary key. as follows: the table "cotizacion" has two primary keys, -fecha -neumatico
the table "table_hija1", has a primary key: "id"
what may be the problem, I will appreciate your help. Thanks,
obs:
-It has to be of the refresh on demand type
-table_child1, is a large table that contains data from 50 small tables. It is not possible to divide
them into 50 small tables.
CREATE MATERIALIZED VIEW LOG ON Cotizacion
WITH primary key
INCLUDING NEW VALUES;
CREATE MATERIALIZED VIEW LOG ON tabla_hija1
WITH primary key
INCLUDING NEW VALUES;
create materialized view vm_prueba3
refresh fast on demand
with primary key
as
select
c.id id1,
e.id id2,
f.id id3,o.neumatico,
o.idproceso,
o.fecha,
o.precio
from Cotizacion o, tabla_hija1 c, tabla_hija1 e,tabla_hija1 f
where
( o.estado=c.vvalor(+) and c.tipo_filtro=1 )
and
( o.segmento=e.vvalor(+) and e.tipo_filtro=2)
error:
ORA-12052: no se puede realizar un refrescamiento rĂ¡pido de la vista materializada SYSTEM.VM_PRUEBA3
- 00000 - "cannot fast refresh materialized view %s.%s"
*Cause: Either ROWIDs of certain tables were missing in the definition or
the inner table of an outer join did not have UNIQUE constraints on
join columns.
*Action: Specify the FORCE or COMPLETE option. If this error is got
during creation, the materialized view definition may have be
changed. Refer to the documentation on materialized views.