xml - MS SQL Server 2008R2 : How to retrieve the content of a large text column? -


i had table column named xml_cache, containing large number of characters 80,000. column declared nvarchar(max).

i had problem retrieving content of column using sql management studio

select [xml_cache], * [dbo].[nzf_topic] nt nt.id '%nzf_1609%' 

wwhen ran sql, output grid contain truncated data, @ 43680-th characters.

see output grid: screenshot - large size:

the output truncated

how retrieve whole content of column (without modifying schema)?

after post question, saw this related question. work around wrap column inside <xml><![cdata[ long content ]]</xml> :

select convert(xml,'<xml><![cdata[' + cast(xml_cache varchar(max)) + ']]></xml>'),   * [dbo].[nzf_topic] nt  nt.id '%nzf_1609%'  

then use simple search & replace (&lt; --> <, &gt; --> >) , can proper output. it's not perfect solution hey, ms products ain't perfect either.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -