I'm trying to extract the first occurrence in an xml
message like this;
NVL(EXTRACTVALUE(message,'//ElementValue[1]'),NULL) as ElementValue
I get error:
XML - ORA-19025: EXTRACTVALUE returns value of only one node.
Any suggestions?
I'm trying to extract the first occurrence in an xml
message like this;
NVL(EXTRACTVALUE(message,'//ElementValue[1]'),NULL) as ElementValue
I get error:
XML - ORA-19025: EXTRACTVALUE returns value of only one node.
Any suggestions?
Currently, the XPath would return every first ElementValue
in a parent element. To actually return only the first occurrence of ElementValue
in the entire document, you need to use parentheses before position index :
(//ElementValue)[1]
Also read @Dimitre Novatchev's answer here