Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

How to check Existing attribute in insert attribute in an xml field

$
0
0
HiI want to insert attibute att1 in field F1 . Value for this attribute is content of another field in this table (F2).My query : update MyTableset F1.modify('insert attribute att1 {sql:column("F2")} into (/ROOT/Node1)[1]')Where F1 Is not null But I get this error :XML well-formedness check: Duplicate attribute 'att1'. Rewrite your XQuery so it returns well-formed XML.How do I check the douplicate attribute ?

Viewing all articles
Browse latest Browse all 3145

Trending Articles