Click here to Skip to main content
15,901,283 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hey everyone,

I have a column in my database table,its set to int.Now,i want it to take decimal values also.Which datatype Numeric/Decimal should i use & why.When i am trying to convert its datatype from int to decimal i am getting this error--

'tblProducts' table
- Unable to modify table.
Arithmetic overflow error converting int to data type numeric.
The statement has been terminated.

help me converting it to accept decimal values.

Thanks
Amit
Posted

You have to change the datatype of your column from int to decimal.

you can't insert double value into the int..
 
Share this answer
 
change datatpe to numeric(18,2).
Here 2 is for upto two decimal place u can set as per ur choice.

During changing it will show truncation of data but it doesn't effect from changin int into numeric
 
Share this answer
 
Comments
AmitChoudhary10 29-Oct-10 2:52am    
thats what i am doing decimal(7,4) but after that i am not able to save it due to the above error.....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900