开发者

XML input getting truncated

I have an xml doc (size: 3.59 mb) with 3765815 total characters in it. My sql server 2008 database table has a column with xml data type. When I try to insert this xml into the column it seems to truncate it.

I thought xml data type can handle 2GB of data. Is this a correct understanding or am i missing something?

Thanks

开发者_运维百科

Here is the query i am using

declare printxml nvarchar(max) 

select printxml=cast(inputxml as varchar(max))
from TableA
where SomeKey='<some key>'

print printxml


Select the data directly instead of printing it to the messages window:

SELECT
    inputxml
    FROM TableA
    WHERE SomeKey = '<somekey>'

The caveat is that you have to set up Management Studio to be able to return all the data to the window. You do that using the following option (the default setting is 2MB):

XML input getting truncated

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜