Domanda

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 &amp; 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.

È stato utile?

Soluzione

Use table alias.

SELECT * FROM #Bla as Bla FOR XML AUTO, ELEMENTS
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top