Why does
select avg(cast(5 as numeric(15,2)))
returns "Arithmetic overflow error converting numeric to data type numeric."?
Documentation states the following about the avg function:
input: decimal category (p, s)
output: decimal(38, s) divided by decimal(10, 0)
I don't really see how it would overflow.