I have this query:
SELECT
client,
month1,
month2,
month3,
month4,
month5,
month6,
(isnull(month1, 0) +
isnull(month2, 0) +
isnull(month3, 0) +
isnull(month4, 0) +
isnull(month5, 0) +
isnull(month6, 0)) /6 as prom
FROM client_total_sales
Months can have null values.
I tried with round, converting data types, but the problem persist.
SQL Server Management Studio show the error during load of the query, I mean a see a few results before the error comes out.
Error message: Mens. 8115, Level 16, State 2, Line 1 Error de desbordamiento aritmético (arithmetic overflow error) al convertir expression al tipo de datos int.