Monday, March 26, 2012

Image size

I have a SQL database that stores image files (pdf, doc, tif etc). Is it
possible to write a query that shows the size of the file being stored ?
Any help would be great.
Thanks
SiYou can get the bytes used with DATALENGTH -
SELECT DATALENGTH(YourImageColumn)
FROM YourTable
You can find more information on DATALENGTH in Books Online.
-Sue
On Mon, 31 Jul 2006 08:36:01 -0700, Simon
<Simon@.discussions.microsoft.com> wrote:

>I have a SQL database that stores image files (pdf, doc, tif etc). Is it
>possible to write a query that shows the size of the file being stored ?
>Any help would be great.
>Thanks
>Si

No comments:

Post a Comment