Wednesday, September 19, 2007

Finding the Length of an Image Field in SQL 2005

Problem: I need to know the size in bytes of an image stored in an Image column in SQL 2005.

Solution: SELECT DATALENGTH(image) FROM schematicsimage WHERE [schematicsid] = 527

(Courtesy of Bruce the DBA)

4 comments:

Anonymous said...

Thanks!

DAVID said...

Thanks. this is most helpful,
but do you know how to convert the lenght to actual byte size and hot to get the resolution of the image?

Anonymous said...

شكرا
thanks
نهاد
nihad

Scott Johnson said...

helped me out today, thanks

Subscribe (RSS)

The Leadership Journey