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

-
Dear Friends,
I have Table named Transcation_Master. It has approx 700000 Records (7 Lacs).
Now When I try to run following query.
Select * from Transcation_Master. Where ObjectID=11931
It Gives me error
An error occurred while executing batch. Error message is: Arithmetic Overflow.
I executes DBCC CheckDB procedure on my Database with all possible options
But still It gives error.
Does any one has solution?
Thnxs
Question
Answers
-
Do you have a computed column in the table which could give the error message?
Demo follows:
-- T-SQL computed column error in SELECT USE tempdb; CREATE TABLE ComputedColumn ( ID TINYINT IDENTITY (1,1) PRIMARY KEY, [Cube] as ID*ID*ID) INSERT ComputedColumn DEFAULT VALUES INSERT ComputedColumn DEFAULT VALUES INSERT ComputedColumn DEFAULT VALUES INSERT ComputedColumn DEFAULT VALUES INSERT ComputedColumn DEFAULT VALUES INSERT ComputedColumn DEFAULT VALUES INSERT ComputedColumn DEFAULT VALUES SELECT * FROM ComputedColumn /* Msg 8115, Level 16, State 2, Line 1 Arithmetic overflow error converting expression to data type tinyint. */ GO DROP TABLE ComputedColumn
Kalman Toth, SQL Server & BI Training, SSAS, SSIS, SSRS; http://www.SQLUSA.com- Marked as answer by Kalman TothModerator Tuesday, May 08, 2012 11:34 PM
All replies
-
-
what is the data type of objectID?
Best Regards,
Melissa Suciadi
If you have found this post helpful, please click the 'Vote as Helpful' link (the green triangle and number on the top-left).If this post answers your question, click the 'Mark As Answered' link below. It helps others who experience the same issue in future to find the solution.
-
-
Hi Viren,
This could be due to the size of OBJECT ID. Resizing the field would help you. (not recommened but this helps)
Do provide the Data type of the filed which could help to resolve this..
Thanks
Ramakrishna
If you have found this post helpful, please click the 'Vote as Helpful'
If this post answers your question, click the 'Mark As Answered' link below.- Edited by Ramakrishna Elashwarapu Wednesday, December 09, 2009 9:02 AM Format of signature..
-
Do you have a computed column in the table which could give the error message?
Demo follows:
-- T-SQL computed column error in SELECT USE tempdb; CREATE TABLE ComputedColumn ( ID TINYINT IDENTITY (1,1) PRIMARY KEY, [Cube] as ID*ID*ID) INSERT ComputedColumn DEFAULT VALUES INSERT ComputedColumn DEFAULT VALUES INSERT ComputedColumn DEFAULT VALUES INSERT ComputedColumn DEFAULT VALUES INSERT ComputedColumn DEFAULT VALUES INSERT ComputedColumn DEFAULT VALUES INSERT ComputedColumn DEFAULT VALUES SELECT * FROM ComputedColumn /* Msg 8115, Level 16, State 2, Line 1 Arithmetic overflow error converting expression to data type tinyint. */ GO DROP TABLE ComputedColumn
Kalman Toth, SQL Server & BI Training, SSAS, SSIS, SSRS; http://www.SQLUSA.com- Marked as answer by Kalman TothModerator Tuesday, May 08, 2012 11:34 PM