oracle 物化视图 ,提示 表或视图不存在
我建了一个物化视图,想实现快速刷新,但是总是提示 表或视图不存在
这是SQL部分
create materialized view test
refresh FAST on demand
start with to_date('04-09-2012 09:27:27', 'dd-mm-yyyy hh24:mi:ss') next sysdate+1
as
select M.DIM_MONTH,
M.DIM_MEDICINE,
DW.ITEM_NAME,
DW.ITEM_SPEC,
DW.MAKER,
SUM(CASE_COUNT) AS CASE_COUNT,
COUNT(CASE_COUNT)
FROM DM_BASE_MEDICINE_INOUT_MON M
inner JOIN DW_DICT_MEDICINE DW on M.DIM_MEDICINE=dw.item_code
and M.dim_month >= dw.VALIDTIME_START
and M.dim_month <= nvl(dw.VALIDTIME_END,date'2050-8-1')
where dw.item_code is not null
AND M.CASE_COUNT>0
AND DW.ITEM_CODE NOT LIKE '9%'
group by M.DIM_MONTH,
M.DIM_MEDICINE,
DW.ITEM_NAME,
DW.ITEM_SPEC,
DW.MAKER
两个表的视图日志我也建立了:
CREATE MATERIALIZED VIEW LOG ON DW_DICT_MEDICINE
WITH ROWID,sequence (item_code,item_name,ITEM_SPEC,MAKER) including new values
------------
CREATE MATERIALIZED VIEW LOG ON DM_BASE_MEDICINE_INOUT_MON
WITH ROWID
(对于)
一直调试,也在网上找了,就是调试不出来,帮我指导指导下!!谢了。
------解决方案--------------------从其他地方抄个例子 来试试看吧
------解决方案--------------------select * from DM_BASE_MEDICINE_INOUT_MON where 1=0
select * from DW_DICT_MEDICINE where 1=0
直接试试是不是提示表或视图不存在