Using XQUERY/Modify to replace a piece of my XML with value from varchar field
Posted on 2008-11-09
I have a table:
config as XML
title as varchar(255)
In MyTable.config I have XML in the following structure:
<component id="1" type="MyPiece" title="My Title" text="junk" />
I need a script to inject the value of MyTable.text into the text attribute of the component node in my config XML.
I know this is wrong, but I want to do something similar:
UPDATE MyTable SET config.configuration.column.row.component.title = title
I believe I want to use XQUERY and the modify function.