Hi all,
I try to add a node into an existing xml row. I followed the guidelines of the "
Update xml in DB2 9.5" doc. The trouble I have is due to namespaces in my xml, unfortunately not covered in the doc.
I try:
Code:
update schema.table
set DATA = xmlquery('copy $new := $DATA
modify do insert <abc:results input="textarea" label="Soem more results"></abc:results>
as last into $new/abc:publication/abc:item
return $new')
Here the error SQL16005N came up.
Now I tried to include a namespace declaration into the query without success:
Code:
update schema.table
set DATA = xmlquery('declare namespace abc="http://www.abc-dummy.de";
copy $new := $DATA
modify do insert <abc:results input="textarea" label="Soem more results"></abc:results>
as last into $new/abc:publication/abc:item
return $new')
Could somebody provide me with the info how to add the namespace in the query?
Best,
Andreas