Does anyone know a good way to count characters in a text (nvarchar) column in Sql Server? The values there can be text, symbols and/or numbers.
So far I used sum(datalength(column))/2 but this only works for text. (it's a method based on datalength and this can vary from a type to another).
sum(datalength(column))/2
You can find the number of characters using system function LEN. i.e.
LEN
SELECT LEN(Column) FROM TABLE
1.4m articles
1.4m replys
5 comments
56.9k users