I\'d like to generate the following output using SQL Server 2012:
- 1
- 2
- 3<
I think if you change the alias of the columns like this it should work. This is because the aliases are same and may be the data type of data is same as well. In case if you have different data in col1, col2 and col3, it shouldn't be showing this behaviour.
SELECT
t.col1 as 'item'
,t.col2 as 'item1'
,t.col3 as 'item2'
FROM tbl t
FOR XML PATH('parent'), TYPE