Hello,
I am using Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production and try to update a single node in a xml-file. I have a simple example
WITH testdata(xmlfile) AS (
SELECT xmltype(
'<pubDat>
<bNumber>string</bNumber>
<fld>string</fld>
<dbInstance>string</dbInstance>
</pubDat>')
FROM dual)
SELECT XMLQUERY(
'copy $tmp := .
modify replace value of node $tmp/pubDat/bNumber with "test"
return $tmp
'
PASSING xmlfile RETURNING CONTENT)
FROM testdata
All attempts lead to ORA-21500: internal errorcode, arguments:...
I've tried
...
SELECT XMLQUERY(
'copy $tmp := $p1
modify replace value of node $tmp/pubDat/bNumber with $p2
return $tmp
'
PASSING xmlfile as "p1",
'test' as "p2"
RETURNING CONTENT)
FROM testdata
...
as well, but the errormessage stays the same. I'm a little bit confused because I don't have a clue what is wrong with this little example.
Thanks a lot in advance for any help.
Regards Carsten