Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Data Corruption Issues
 Arithmetic overflow error

Author  Topic 

shart
Starting Member

2 Posts

Posted - 2011-06-24 : 00:17:28
I am using Micro Soft Dynamics 2009. When I try to access a value list or quantity list under the reports tab I get "Arithmetic overflow error for type Int. Value=45000110211.0000000
I am new to SQL server and have no idea how to begin to solve this problem. Has anyone else seen an error code like this?
Thanks in advance
Shart

Shart

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-06-24 : 04:31:40
Is it a sql server error or dynamics?
Maximum value for an int is 2,147,483,647
You might need to convert to bigint or decimal - or maybe the value is wrong.
Often for sums and counts you need
sum(convert(bigint,val))

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

shart
Starting Member

2 Posts

Posted - 2011-06-24 : 10:03:24
Thanks for the reply, Your question whether the problem is SQL server or Dynamics is the root problem isn't it? After eliminating the hardware in a trouble shooting scheme determining what bit of software is having a problem is the next step correct? I am currently at a loss and seeking any advice or ideas anyone has. The tech support group (NuRoll)wants $120.00 to look at the problem and won't guarantee a solution. Microsoft wants $175.00 just to submit the question(credit card number up front please!) I am really disappointed with the support for this software and will be considering other options in the near future. However I am stuck at present with this application and will have to submit reports after an inventory next week.

Shart
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-06-24 : 10:34:56
You don't need support. You need to change it to BIGINT.

45,000,110,211 is about 20 times larger than what will fit into an INT.

As Nigel said, 2,147,483,647 is the largest value an INT can store.
Go to Top of Page

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-06-24 : 11:15:32
I'm guessing from the error message that it is trying to do a sum in sql server.
It might just be doing sum(col) in which case can you chage the column type to bigint? That's if you can identify the column.

Try using the profiler to trace the sql statements sent to the database then you can run it manually to see what is causing the issue.
It's a bit odd that the value displacyed as being in error is a decimal - could be the client has an int datatype it is trying to use.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -