Determine length of SQL Server 2005 XML Data returned
Is there a way to predermine the leng开发者_如何转开发th of returned XML Data from SQL Server.
Ex:
SELECT *
FROM Products
FOR XML RAW, ROOT('products')
I am using SQL Server 2005.
SELECT DATALENGTH (
(SELECT *
FROM products
FOR XML RAW, ROOT('products')
)
)
It will give to you size in bytes. for details, see here: http://msdn.microsoft.com/en-us/library/ms173486(v=SQL.90).aspx
精彩评论