Recently an incident came across my desk where an end user was receiving an error trying to retrieve some records from the database. The error message the customer received was “An error occurred while executing batch. Error message is: Arithmetic Overflow”.
Experience has taught me that this message is related to an invalid dataset within a record or invalid column size. In this particular event the column was FLOAT and a data entry contain characters and symbols. Obviously an error in user entry or an import.
The issue that comes up is how can you query the data if it continues to give this error each time you try to query a set of data that contains that record. The easiest way is to convert the column to another data type. In my case I converted the FLOAT data type to NVARCHAR.
SELECT CONVERT(NVARCHAR(255),COLUMN) AS Column_Name
WHERE Value = ‘ABC123’
I am then able to query the dataset to my range of data to see the invalid record. I can then run an update statement to correct the values or null them out.