I am trying to change some XML values in a database. I can get it to work with columns containing XML that use the XML data type. However, I cannot get it to work with TEXT columns.
In addition, I can SELECT the XML data in TEXT columns (using CAST () to convert it to XML), but still cannot UPDATE.
Example:
UPDATE [xmltest]
SET [xmltext].modify('replace value of (/data/item[1]/text())[1] with "newvalue"')
Error: It is not possible to call methods in the text.
Is there a way to get this to work on a TEXT column? TONS data is already stored there, so I do not want to request a change in the data type in the column.
Thank!
Sunsu
source
share