I am trying to create a partitioned materialized view but its failing with the error ora-00933
create materialized view my_mv
refresh fast with rowid
enable query rewrite
as
select sal_dt ,
sum(sales) sum_sales
from sales
group by sal_dt
partition by range (sal_dt)
interval (numtodsinterval(1,'day'))
(partition p_sal_dt_min values less than (to_date(' 2013-11-18 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian'))
partition by range (sal_dt)
*
error at line 10:
ora-00933: sql command not properly ended
Any ideas what am i missing here
Physical properties go before the query. Move the PARTITION BY ... clause just after "enable query rewrite" piece ( reference ).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.