I encountered an arithmetic overflow in a simple SELECT statement. Query was as below e.g.
SELECT [SaleValue] FROM Sales
[SaleValue] was of data type
decimal(9,0) and not a computed column.
The reason this happened was because somehow the column had a row where this field was storing a value GREATER than specified datatype, e.g.
I could only get the select to work when I increased the size of the column. The table in question has two other instances in two other columns and rows.
How was this situation possible? How was an out of range value saved in the column in the first place?
I'm using Microsoft SQL server + this is a base table, not a view.