Is it possible to modify multiple attributes on a single node within one Update?
I have something similar to:
<ENTITY NAME="entity1">
<ATTR ID="attr1" CAPTION="Attributes to Change" SIZE="100" WIDTH="100"></ATTR>
</ENTITY>
I’ve been able to use three separate Updates to modify the CAPTION, SIZE, and WIDTH attributes, but I’ve looked in vain for some way to combine them into a single Update. Is it possible?
Examples of the Updates I’ve used:
UPDATE t
SET [column_name].modify('replace value of (/ENTITY/ATTR/@CAPTION)[1] with "New Attribute Caption"')
FROM table t
UPDATE t
SET [column_name].modify('replace value of (/ENTITY/ATTR/@SIZE)[1] with "200"')
FROM table t
UPDATE t
SET [column_name].modify('replace value of (/ENTITY/ATTR/@WIDTH)[1] with "200"')
FROM table t
No it is not possible.
From replace value of (XML DML).