Solved

Runtime Err. Arithmetic Overflow Error Converting Numeric to DataType Numeric

Posted on 2004-04-09
8
662 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
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now