Skip to content

Tag: xml

SQL: Delete XML node in an UPDATE statement

I keep getting this error: In search of a solution to this answer I came across this SO article about updating in a SELECT statement: How do I UPDATE from a SELECT in SQL Server? Example… Note: the field CustomProperties is nvarchar(max) which I convert to xml. I also tried a cursor (nasty things), but getting the same error. Is

Add child note above node

Am trying to get from SQL to XML however have to format this correctly or it will not work. I am using C# to insert my sql between the QBXML This is what I get This is what I need ”’ ”’ I am not sure how to add the “CustomerAddRq” over each “CustomerAdd” Answer Try xml linq. I took

SQL – FOR XML – How to add property to tag

I have the a stored procedure to generate an XML document based on the UBL-TR-2.1 standard. This is the query where the xml data is generated: A sample output of this query is this XML file: This works so far so good. But now some XML elements shall have attribute in the element itself. One example is: How can I