Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Refresh a materialized view every month

813040Jun 26 2014 — edited Jun 26 2014

I want the Oracle database to refresh a materialized view every 24th of the month. Here's a snippet of the code:

CREATE MATERIALIZED VIEW XXQBIX.XXEMC_HR_WKR_FISCAAL_LOON_MV (MONTH,PERSON_ID,ASSIGNMENT_ID,ORGANIZATION_ID,JOB_ID,FISCAAL_LOON)

TABLESPACE APPS_TS_TX_DATA

PCTUSED    0

PCTFREE    10

INITRANS   2

MAXTRANS   255

STORAGE    (

            INITIAL          128K

            NEXT             128K

            MINEXTENTS       1

            MAXEXTENTS       UNLIMITED

            PCTINCREASE      0

            BUFFER_POOL      DEFAULT

            FLASH_CACHE      DEFAULT

            CELL_FLASH_CACHE DEFAULT

           )

NOCACHE

LOGGING

NOCOMPRESS

NOPARALLEL

BUILD IMMEDIATE

REFRESH COMPLETE

START WITH TO_DATE('24-07-2014 06:00:00','dd-mm-yyyy hh24:mi:ss')

NEXT TO_DATE('24-08-2014 06:00:00','dd-mm-yyyy hh24:mi:ss')

WITH PRIMARY KEY

AS

/* Formatted on 26/06/2014 15:37:37 (QP5 v5.227.12220.39724) */

  SELECT xmt.month,

         paf.person_id,

         paf.assignment_id,

         paf.organization_id,

         paf.job_id,

etc

etc

Is this correct:

START WITH TO_DATE('24-07-2014 06:00:00','dd-mm-yyyy hh24:mi:ss')

NEXT TO_DATE('24-08-2014 06:00:00','dd-mm-yyyy hh24:mi:ss')

Iow will the view be refreshed on 24-09-2014, 24-10-2014 and so on?

TIA!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 24 2014
Added on Jun 26 2014
1 comment
1,367 views