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
for trying update settings 'newtest'
this execute nothing updating! help!
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
Post a Comment