Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Field Size (50K characters results in 150MB field size)

$
0
0

Hi,

There was some data inserted a nvarchar(max) field into a table using an application. If we count the number of characters in the field, its about 50k, however if we check the size of the field using datalength, it is about 150MB (which is impossible). This causes the record to be really large and hence takes a log time for it to be retrieved.

Any idea why this may be? Is there some special characters somewhere in the data, if so, how can i check and find them.

(If I copy the field text into SSMS and update the field back, then the size drops down to a more reasonable value (in bytes))

Thanks.


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>