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
 New to SQL Server Programming
 Arithmetic overflow Error

Author  Topic 

samhrishi
Starting Member

13 Posts

Posted - 2010-11-30 : 04:15:34
Server: Msg 8115, Level 16, State 2, Line 1
Arithmetic overflow error converting expression to data type int.
The statement has been terminated.
whts the solution for this

sam

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-11-30 : 04:24:08
The first step to the solution is to show us the statement.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

samhrishi
Starting Member

13 Posts

Posted - 2010-11-30 : 04:51:52
actually i troubled with integer datatype when i m going to insert mobile number into myinfo table ,
last msg waw thrown...

thnks

sam
Go to Top of Page

waterduck
Aged Yak Warrior

982 Posts

Posted - 2010-11-30 : 05:07:34
int maximum number = 2147483647
if urs phone number = 60123456789
this already exceed the limit of int can handle, u can use bigint xD
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-11-30 : 05:16:50
There is no need to make a phone number integer.
You can use varchar().


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-11-30 : 05:49:17
What happens to international numbers if you chop off the leading zeros by storing them in an integer?

We have to dial 00 prefix here for international.

To use SMS we have to send as +44 prefix for international, and just 12345... (leading 0 removed) for national numbers.

I would prefer to store in VARCHAR so I have it in "human readable form" and then have my application strip of the leading zero when appropriate.
Go to Top of Page
   

- Advertisement -