Use table alias.
SELECT * FROM #Bla as Bla FOR XML AUTO, ELEMENTS
Question
I am using:
SELECT * FROM #Bla FOR XML AUTO, ELEMENTS
which gives me this:
<_x0023_Bla>
<Id>11</Id>
<Name>XYZ</Name>
</_x0023_Bla>
<_x0023_Bla>
<Id>14</Id>
<Name>X & Y</Name>
</_x0023_Bla>
Is there a way to suppress x0023? The intention is to pass this as NVARCHAR(MAX) to a sproc and then reassemble the table #Bla there. Thanks.
La solution
Use table alias.
SELECT * FROM #Bla as Bla FOR XML AUTO, ELEMENTS