I need to return my result set in XML and this works fine, but if the number of records are increased, my xml output is truncated
here is my query
select t.id,t.name,t.address from test FOR XML AUTO, ROOT('Response'), ELEMENTS
However I have set some option to increase the output result set like..
Tools --> Options --> Query Results --> SQL Server --> Results to Text --> Maximum number of characters displayed in each column Tools --> Options --> Results --> Maximum characters per column
but still I am unable to get my desired result.
please suggest my solution
EDIT: However when I click on the XML, it open in another query window and all xml shown here, but it not return all xml instead of truncated xml.
Thanks....
Support for XML is integrated into all the components in SQL Server in the following ways: The xml data type. XML values can be stored natively in an xml data type column that can be typed according to a collection of XML schemas, or left untyped. You can index the XML column.
Try the following:
Declare @xmldata xml set @xmldata = (select ... From test for xml...) select @xmldata as returnXml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With