我有这个疑问,
DECLARE @Result XML;
SELECT @Result = ( SELECT PD.*
FROM [ProductDetailedDescriptions] PD
LEFT JOIN [Products] P ON (PD.ProductID= P.ID)
WHERE PD.ProductID = 23
AND P.RetailerID = 1
AND PD.LanguageID = 1
ORDER BY [ORDER]
FOR XML AUTO, ELEMENTS, ROOT('root')
)
这抛出XML parsing: line 1, character 2038, illegal xml character
. 当我只选择时,
SELECT PD.*
FROM [ProductDetailedDescriptions] PD
LEFT JOIN [Products] P ON (PD.ProductID= P.ID)
WHERE PD.ProductID = 23
AND P.RetailerID = 1
AND PD.LanguageID = 1
ORDER BY [ORDER]
FOR XML AUTO, ELEMENTS, ROOT('root')
它显示以下xml,
<root>
..............................................
..............................................
<PD>
<ID>4187</ID>
<ProductID>23</ProductID>
<Header>aa</Header>
<Description>with other</Description>
<Order>7</Order>
<LanguageID>1</LanguageID>
</PD>
注意#x3。在我的应用程序中,它只是一个空间。它是 SQL Server 的错误吗?