Create Materialized View:
CREATE MATERIALIZED VIEW TEST.DW_CUSTOMERLIFECYCLE
ON PREBUILT TABLE WITH REDUCED PRECISION
REFRESH COMPLETE
START WITH TO_DATE('02-Jun-2009 02:00:00','dd-mon-yyyy hh24:mi:ss')
NEXT TRUNC(SYSDATE+1) + 2/24
WITH PRIMARY KEY
AS
SELECT ORGANIZATIONUNITID UPOID,STATUS,EVENTNAME,EFFECTIVEFROM,EFFECTIVETO,
C.CREATEDBY,C.CREATIONDATE,C.LASTMODIFIEDBY,C.lastmodifiedDate
FROM customerlifecycle@repo C, DUAL@repo C;
This creates a materialized view and schedule a job by default and uses a prebuilt table. Hence make sure a table is already created. The materialized view created will do complete refresh as defined in the script.
No comments:
Post a Comment