Update XML stored in a XML column in SQL Server -


i have sample table in sql server 2012. running queries against .modify() xquery method executing not updating.

here table

xml table

for trying update settings 'newtest'

xml snippet

this execute nothing updating! help!

not update snippet

since there xml namespace (xmlns:dev="http://www.w3.org/2001/xmlschema") in xml document, must inlcude in update statement!

try this:

;with xmlnamespaces(default 'http://www.w3.org/2001/xmlschema') update xmltable set xmldocument.modify('replace value of (/doc/@settings)[1] "newtest"') xmlid = 1 

Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -