开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜