DBAtlas · Database operations atlas

8115: Arithmetic overflow error converting expression to data type

SQL Server

What does it mean?

The value produced by an arithmetic operation or conversion exceeded the range the target data type can hold. An overflow occurred because the number is too large.

Why does it happen?

A sum/product (SUM) exceeding the int range, a large value assigned to a column with a small type, insufficient decimal precision/scale, or an IDENTITY value reaching the type limit.

How to fix it

Use a wider type for intermediate calculations (e.g. SUM with CAST(my_column AS bigint)). Increase decimal precision/scale. Enlarge the column type to fit the data. Convert expressions at risk of overflow before computing and constrain input ranges.

Open in DBAtlas →

More from this engine