C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Arithmetic overflow error converting numeric to data type money. In SqlServer2005


Posted Date: 30 Aug 2008      Total Responses: 1

Posted By: Gaddamchandrakanth       Member Level: Silver     Points: 1



Hi,
This is from Chandrakanth.

We are using sqlserver 2005. in that we are getting error while updating Query.

the Query is

UPDATE tr_subclaimpolicyinformation SET
excessrptdt='6/13/2008',
excesspaiddt='6/13/2008',
excessamtpaid=999999999999999.0,
modifiedby=1000,
modifieddt=GETDATE() WHERE intinsecovid=1006 AND intscpolid=1081


When we are updating the Query we arte getting error

"Arithmetic overflow error converting numeric to data type money."

And when we are changing the value of excessamtpaid=899999999999999.0, there is no error at update query

And when we are working with the value of excessamtpaid=999999999999999.0,

we are getting error like

"Arithmetic overflow error converting numeric to data type money."

Can any one give me some suggestions.

Thanks and Regards
Chandrakanth





Responses

Author: Karthikeyan S    30 Aug 2008Member Level: GoldRating:     Points: 5

Hi,

There is Range limitation for this datatype and the range is:

Range:
-922,337,203,685,477.5808 to 922,337,203,685,477.5807

Storage Bytes:
8 bytes

So it doest throw error when you entered '899999999999999.0'.
922,337,203,685,477.5807 //max positive value
999,999,999,999,999.0 //your entered value.

Do validation in your control not to enter beyond '922,337,203,685,477.5807'.



Post Reply
You must Sign In to post a response.
Next : Very Necesary For Me.
Previous : How to make schedular in Ms-Sql
Return to Discussion Forum
Post New Message
Category: SQL Server

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use