XML Insert attribute
When I update a开发者_开发知识库n xml column:
SET XmlDocumentData.modify('insert attribute User {sql:variable("@User")}
as last into (/Configuration/Process/Tasks)[1] ')
I am getting an error:
Msg 6905, Level 16, State 3, Line 27 XML Validation: Attribute 'User' is not permitted in this context. Location: //@*:User
What is a way to add new attributes in every task?
I guess that the column XmlDocumentData is bound to a Schema Collection and that the User
attribute is not allowed in the Tasks
node. Keep in mind that XML is case sensitive.
精彩评论