I have a table which stores DOCUMENTS as image datatype. I wish to find the average size of all the documents in the table. I am running the following query
select AVG(DATALENGTH(document)) from DOCUMENT
document is the field of datatype image. I am getting the following exception
Arithmetic overflow error converting expression to data type int.
Please help me resolve this error?