错误ORA-02000 - 在MATERIALIZED VIEW

时间:2018-02-02 16:52:53

标签: sql oracle

这是我的问题

  CREATE MATERIALIZED VIEW STRUTT_AFAM_RD (CD_ENTE, CD_STRUTTURA)
  TABLESPACE FLUSSI_SIA01D
  BUILD IMMEDIATE
  USING INDEX 
  REFRESH COMPLETE ON DEMAND NEXT TO_DATE(TO_CHAR(SYSDATE + 1, 'DD-MON-
  YYYY') || ' ' || '05:00:00','DD-MON-YYYY HH24:MI:SS')
  WITH ROWID USING DEFAULT LOCAL ROLLBACK SEGMENT
  USING ENFORCED CONSTRAINTS DISABLE ON QUERY COMPUTATION DISABLE QUERY 
  REWRITE
  AS (SELECT SUBSTR(S.CD_STRUTTURA_CUDES,1,3) CD_ENTE,
           S.CD_STRUTTURA_CUDES  CD_STRUTTURA
      FROM PONTE_EVESAN.STRUTTURE_FAM_AN@SEBP_PONTE_EVESAN S
     WHERE S.DT_FINE_VALIDITA IS NULL
       AND S.FL_ANNULLA = 0);

  CREATE UNIQUE INDEX I_SNAP$_SIAD_STRUTT_AFAM_RD ON STRUTT_AFAM_RD 
  (M_ROW$$) 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS NOLOGGING 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE FLUSSI_SIAD01D ;

  COMMENT ON MATERIALIZED VIEW STRUTT_AFAM_RD  IS 'STRUTTURE AFAM';

错误:ORA-02000:parola chiave QUERY mancante(缺少QUERY关键字) 02000. 00000 - "缺少%s关键字"

1 个答案:

答案 0 :(得分:1)

您使用的是哪个数据库版本?什么是DISABLE线应该做什么,特别是COMPUTATION(关键?)字?

这是11g CREATE MATERIALIZED VIEW文档,阅读它&遵循语法。

无论如何:看看这个实际上有效的代码。注意差异(我用评论标记):

window.onblur=()=>{//deeplink check (maybe unsuccessfull?)
window.onfocus=()=>{//deeplink unsucesfull};

}