While updating oracle xml data in table am getting below error.
SQL Error: ORA-18126: XUDY0027 - Invalid target expression 18126. 00000 - "XUDY0027 - Invalid target expression" *Cause: Target expression of an INSERT, REPLACE, or RENAME expression evaluated to an empty sequence. *Action: None.
update test
set XMLDATA=
xmlquery(
'copy $d := .
modify (
for $i in $d/workbook/worksheet
return replace value of node $i/@sheetName with concat($i/@sheetName, $i/@sheetId)
)
return $d'
passing test.XMLDATA
returning content
)
XML:-
'<workbook>
<worksheet sheetName="MySheet" sheetId="1"/>
</workbook>'