SELECT LEN(DATA) , LEN(FIELDSS) , id FROM TESTLEN
–You cannot use len funtion for Text fields , you have to use datalength

SELECT LEN (‘DATA ‘) FROM TESTLEN
–This will trim spaces and then provide you the length

SELECT DATALENGTH (‘DATA ‘) FROM TESTLEN
–This will not trim spaces.

Note :
Return type for both is bigint if expression is of the varchar(max), nvarchar(max) or varbinary(max) data types; otherwise int.

Other notes:
DATALENGTH is especially useful with varchar, varbinary, text, image,
nvarchar, and ntext data types because these data types can store
variable-length data.
The DATALENGTH of NULL is NULL.
THE LEN of NULL is NULL