How to find length of a BLOB (image data type) in T-SQL

I need to find the length of an image data type. I have tried:
SELECT LEN(CAST(FileData AS varbinary(8000))) AS FileLength FROM Files

but because many of the columns are over 8000 in length (and that is the maximum length for a varbinary) I can't find the length of the rest.

Suggestion?
LVL 1
TheScreamAsked:
Who is Participating?
 
cdillonConnect With a Mentor Commented:
SELECT DATALENGTH(<<textfield>>) FROM <<TableName>>
0
All Courses

From novice to tech pro — start learning today.