I got some problem with my SQL query which create a XML file. I want to do UNION it this query but it doesn\'t work.
(SELECT 1 AS \"ns0:kindOfIt
Using UNION will remove duplicate values for the result so SQL Server has to compare the XML from the first part with the second part and decide if they are equal and that is not implemented for XML.
You probably don't want the duplicate check so change to UNION ALL instead and it will work fine for XML data as well.