I have a table with an integer column with some fairly large numbers in it. Im trying to average some values in this and sometimes it works other times it gives this error
"Arithmetic overflow error converting expression to data type int."
I've broken it down and this sample produces the error
create table LargeNumbers (number int)
insert into LargeNumbers values (100000000) -- X 30
select avg(number) from LargeNumbers
Does anyone know how I can get this to calculate the average?