XML Output is Truncated in SQL XML Output is Truncated in SQL xml xml

XML Output is Truncated in SQL


Try the following:

Declare @xmldata xmlset @xmldata = (select ... From test for xml...)select @xmldata as returnXml


I've had the same problem with management studio and xml result sets. I've solved this by getting the output programatically with c#, with SqlDataReader.


I had the same issue. I changes my Query result setting to Unlimited, but it didnt work. There is a work around. Its not very neat, but if you do want to continue to use SQL Server Management studio and get the results. Tweak the query to convert the xml stored using:

convert(xml,'<xml><![CDATA[' + cast(MyColumnWithXml as varchar(max)) + ']]></xml>') 

The complete text is returned. Please note you will have to do some formatting at you end