2
votes
1answer
39 views

What is the difference between node types and atomic types in XML

Im Studying TSQL and I came to the chapter regarding XML, and here a question that I cannot find an answer: "What is the difference between node types and atomic types"? Thank you!
1
vote
1answer
820 views

Trying to Build TreeView Query in T-SQL

I have parent records in two tables, Table1 and Table2. Some records in Table3 are children of Table1, and some are children of Table2. I would like to build a query that I can use to populate a ...
3
votes
1answer
2k views

How to remove xmlns from child elements with FOR XML

I have a TSQL query that I use to generate a SOAP document. I am using two namespaces. Namely: - http://schemas.xmlsoap.org/soap/envelope/ for "packaging" the soap document - A custom one that ...
4
votes
1answer
2k views

T-SQL: Convert XML to string without self-closing tags

We have a weirdo system we're integrating with which consumes XML, but it does not understand self-closing tags, so <BOOKING> <BOOKINGID>56812</BOOKINGID> <PERSONCODE /> ...
8
votes
1answer
305 views

Variable for element name

I have this tSQL code which works OK: SELECT c.logguid, a.b.value('./PropertyValue', 'varchar(max)') asd FROM [dnn].[dbo].[EventLog2] c cross apply ...