?
Solved

Runtime Err. Arithmetic Overflow Error Converting Numeric to DataType Numeric

Posted on 2004-04-09
8
Medium Priority
?
687 Views
Last Modified: 2013-12-25
Hi,
I'm Trying to update my database with a numeric valule of a particular table.  While doing this process I'm getting the runtime error (-2147217833) Arithmetic Overflow error converting Numeric to Datetype Numeric.

The DataBase I'm using is SqlServer. I'm begining a session within that session I'm updating a same table twice, the first time it is getting updated but it fails in the 2nd time.

Can you pls. help me in this regard

Regards
0
Comment
Question by:spk2shankar
7 Comments
 
LVL 6

Expert Comment

by:mmusante
ID: 10791054
It seems like your update is between to different number formats and that in some case the conversion is not possible

(for example converting a Int to a SmallInt)

plese post your update query and the table definition ...
0
 

Author Comment

by:spk2shankar
ID: 10791206
Hi  mmusante
thank you for showing interest

My table structure is like this
Table Name - > Remit

Columns
   Remit_No       Numeric(7),
   Remit_Date    SmaleDateTime,
   Remit_Curr    Varchar(3),
   Remit_amt     Numeric(18,3),
   Remit_Batch   Numeric(7)

First I'm updating the table with amount at that point of time it is getting updated. Then
I'm updating the table with a query Update Remit set Remit_Batch = 17 where Remit_No = 76584
and Remit_Date = '2004-04-09'

Regards
0
 
LVL 6

Expert Comment

by:mmusante
ID: 10791341
Try changing the date condition to ...
Remit_Date = {d '2004-04-09'}
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:spk2shankar
ID: 10792289
hi mmusante
thankyou I even tried that, that is not working
regards
0
 
LVL 27

Expert Comment

by:Dabas
ID: 10793440
Hi spk2shankar:
> and Remit_Date = '2004-04-09'
This definitely is wrong.
Have you tried
and Remit_Date = CONVERT(DATETIME, '2004-04-09 00:00:00', 102))

Dabas
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 360 total points
ID: 10803399
There does not appear to be anything illegal about this statement:
Update Remit
set Remit_Batch = 17
where Remit_No = 76584 and Remit_Date = '2004-04-09'

So I would suggest you check to see where exactly you are getting the error and if possible attempt to duplicate it in SQL Query Analyzer.

Also, are you going to return to the following open question?
http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_20927090.html
0
 
LVL 29

Expert Comment

by:leonstryker
ID: 11315797
No comment has been added to this question in more than 21 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:

Answered acperkins

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

leonstryker
EE Cleanup Volunteer
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question