문제

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.

도움이 되었습니까?

해결책

Use table alias.

SELECT * FROM #Bla as Bla FOR XML AUTO, ELEMENTS
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top