An error occurred while executing batch. Error message is: Arithmetic Overflow

, 2014-07-31

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

FROM TABLE

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.

Share

Rate

Share

Share

Rate

Related content

Database Mirroring FAQ: Can a 2008 SQL instance be used as the witness for a 2005 database mirroring setup?

Question: Can a 2008 SQL instance be used as the witness for a 2005 database mirroring setup? This question was sent to me via email. My reply follows. Can a 2008 SQL instance be used as the witness for a 2005 database mirroring setup? Databases to be mirrored are currently running on 2005 SQL instances but will be upgraded to 2008 SQL in the near future.

2009-02-23

1,567 reads

Networking - Part 4

You may want to read Part 1 , Part 2 , and Part 3 before continuing. This time around I'd like to talk about social networking. We'll start with social networking. Facebook, MySpace, and Twitter are all good examples of using technology to let...

2009-02-17

1,530 reads

Speaking at Community Events - More Thoughts

Last week I posted Speaking at Community Events - Time to Raise the Bar?, a first cut at talking about to what degree we should require experience for speakers at events like SQLSaturday as well as when it might be appropriate to add additional focus/limitations on the presentations that are accepted. I've got a few more thoughts on the topic this week, and I look forward to your comments.

2009-02-13

360 reads