Solved

Runtime Err. Arithmetic Overflow Error Converting Numeric to DataType Numeric

Posted on 2004-04-09
8
677 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 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 90 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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

688 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