通过运行以下查询:
SELECT *
FROM XMLTABLE (
'
declare function local:path-to-node( $nodes as node()* ) as xs:string* {
$nodes/string-join(ancestor-or-self::*/name(.), ''/'')
};
for $i in $rdoc//name
return <ret><name_path>{local:path-to-node($i)}</name_path>{$i}</ret>
'
PASSING XMLPARSE (
CONTENT
'
<users><user><name>user1</name></user>
<user><name>user2</name></user>
<group>
<user><name>user3</name></user>
</group>
<user><name>user4</name></user>
</users>'
) AS "rdoc" COLUMNS name_path varchar2 (4000) PATH
'//ret/name_path', name_value varchar2 (4000) PATH
'//ret/name')
我收到以下错误:
ORA-19112: error raised during evaluation:
ORA-06550: line 1, column 13:
PLS-00201: identifier 'SYS.DBMS_XQUERYINT' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
问题是尚未安装Java。虽然 XQuery 在大多数情况下是通过 C 执行的,但 10.2.0.1.0 使用基于 Java 的 XQuery 解析器。
请假设我有 SYS 和 SYSTEM 凭据。
如何为 Oracle 扩展安装 Java?
预先感谢您的友好合作。