But PATH, despite using square brackets, will still spit the hook and secceed from the union with "Msg 6850, Level 16" and "Column name 'tunnel(here)' contains an invalid XML identifier as required by FOR XML; '('(0x0028) is the first character at fault"
I used the query in the below way but error was still there:
SELECT ID, [Create Date], [File Count] FROM #tblTemp
Finaly I had to remove spaces from column. I used FOR XML RAW and found that space was replaced with 0x0020 and column was renamed as Create_x0020_Date and parser was getting. Therefore, I replaced spaces and used FOR XML PATH.
Last Visit: 31-Dec-99 18:00 Last Update: 25-Sep-16 15:37