maybe somebody out there, who can help me?
I want to update some values stored in a XML column in DB2. I tried to use the following after an example:
select xmlquery( 'copy $new := $INFO modify do replace value of $new/customerinfo/phone with "905-xxx-xxxx" return $new ') from xmlcustomer where cid = 1000;
Now my question is: It is possible to use a DB-derived value instead of 905-xxx-xxxx.
I think on something like:
SELECT x.phonenumber FROM SCHEMA. "NUMBERS" o, xmltable( '$c/Block0/*/phonenumber' passing o.data as "c" columns phonenumber varchar(16) path '.' ) as x where datasetid = XXX and x.phonenumber like '049%' fetch first 1 rows only ;