Problem: I have one SQL Server database table ‘ServiceData’ in the SQL Server which has one ‘JSONObjectExcel’ column having large JSON data.
The column JSONObjectExcel size is NVARCHAR(MAX).
Now I have run select TOP 1 JSONObjectExcel from
dbo.ServiceData where ID=1, I get the result for JSONObjectExcel but when I
copy the JSONObjectExcel column from the result, it does not get me the full
result.
Solution of this issue:
I discussed it with Multiple SQL experts and found the solution for it.
SQL Query:
SELECT CAST('<![CDATA[' + JSONObjectExcel + ']]>' AS
XML) FROM dbo.ServiceData where ID=1;
How do I view the full content of a text or varchar (MAX)
column in SQL Server?
SELECT CAST('<![CDATA[' + LargeTextColumnName + ']]>'
AS XML) FROM TableName;