I try to put a XML in a xml data-type in SQL Server 2008.
I created a table with a xml column, created a proper schema for the column, when I try to insert a value – the query succeeds but when I select the data with a query I can see it is missing (the xml is not complete).
The syntax of the insert contains a SELECT statement which ends in
for xml path('TreeNode')
if I run that SELECT by itself it brings me proper full XML document unlike the data inserted.
I’ve read that the limitation of XML column is 2GB, I reach nowhere near that for now.
What could be the problem ?
Thanks in advance.
found the answer(by mistake actually, just went through sql settings today, unrelated to this problem)
For anyone who’ll run into this problem:
in tools->options->Query results->results to grid, there is a default limitation on data retrieved as XML of 2MB, changed it to “unlimited” and it works like charm, all the insert statements were good
Thanks for your comment.