sql server xml delete two attributes at the same time

dirtyv

New Member
I found the following which shows how to delete an attribute from XML in SQL Server: How to delete an attribute from an XML variable in sql server 2008?But I would like to delete two attributes at once. I tried something like the following:\[code\]UPDATE TABLE SET xmlField.modify('delete (/clue_personal_auto/@attr1)[1]'), xmlField.modify('delete (/clue_personal_auto/@attr2)[1]') WHERE compare = 357\[/code\]But I get an error that the same column cannot be modified more than once during an update. Is there a way to delete both within once statement, or should I just run two separate updates?
 
Back
Top