Archives by Tag 'SQL2005'

SQL 2005 generates XML comment, array of elements

By admin - Last updated: Monday, November 12, 2007

SELECT         ‘nameValue’ AS “@name”,         CAST(’<!– your comment –>’ AS XML),         ‘anotherValue’ AS “another”,         (SELECT ‘i’ AS “@name”, ’1′ AS “@value” FOR XML PATH(’item’), TYPE),         (SELECT ‘j’ AS “@name”, ’2′ AS “@value” FOR XML PATH(’item’), TYPE) [...]