var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: sql/xml help
Hello, I am new to to DB2 and am stuck on a simple query. I have a table that contains some columns, one of which is an XML datatype.
I am using DB2-express c v9.7
When doing the below simple xquery through the control center
copy $mycust := db2-fn:sqlquery('select XmlFile from table')
do replace $mycust//DataNode/text()
it does in fact return properly. But when I try to incorporate it into a sql update statement such as
SET XmlFile = xquery (
copy $mycust := $c
modify do replace $mycust//DataNode/text()
passing XmlFile as "c"
I get an error message stating:
SQL0104N An unexpected token "copy $mycust := $c modify do replace $myc" was found following "= xquery ( transform". Expected tokens may include: "<space>".
I have gone back and forth, verifying syntax, typos, and still have not been able to locate the problem. Can someone help?
Figured it out apparently, I wasn't looking at the samples carefully enough... it should have read xmlquery(.... instead of xquery(...
Tags for this Thread