I have a temp table with an XML
column (XMLColumn
) and a VARCHAR
column (ABCColumn
).
I am trying to replace the value of a particular XML node within XMLColumn
with the value that is in ABCColumn
of the same row. I need to do this for every row within the temp table. Is this possible to do without a cursor that would hold the replacement value for each fetch?
I have tried doing an update to the temp table using
XmlColumn.modify('replace value of ... with ...')
but I do not have a variable in this case. I need to get the value of a XYZColumn
and use it as the replacement value. Every example I have seen either uses a variable or a hardcoded value - not a column value of the same row.
Also, I am using SQL Server 2005. Does anyone have any ideas?