【发布时间】:2011-04-07 21:48:03
【问题描述】:
我有一个表xml_documents 有两列:一个document_id 列(主键)和一个带有一些XML 数据的xml 列,这是一个无模式的XMLType。我可以只使用document_id 创建一个物化视图:
create materialized view mv refresh fast on commit as
select document_id
from xml_documents
这很好用,但不是很有用。如您所料,我希望物化视图从 XML 中提取数据,为此我使用extractValue()。我正在尝试以下方法:
create materialized view mv refresh fast on commit as
select document_id, extractValue(xml, '/my/gaga') gaga
from xml_documents
这失败了:
ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view
我应该如何在提交物化视图上创建快速刷新以从 XML 中提取值?
【问题讨论】:
标签: oracle materialized-views xmltype extract-value