mike55 Posted October 31, 2007 Posted October 31, 2007 I am trying to store decimal values in a SQL Server 2000 database, each decimal value can only have a max of two digits after the decimal point. In my database I have created my field, and set the precision to 7, and the scale to 2. This automatically adjusted the length of the field to 5. I am using stored procedures to insert data into the database table, I have specified that I am passing a decimal datatype of size 5. My problem is that if I insert the value 1.50, it automatically rounds it up to 2.0. Any suggestions on how to stop the rounding occuring as it seems only to occur when I am passing the value into the database through the stored procedure. Mike55. Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
mike55 Posted October 31, 2007 Author Posted October 31, 2007 Problem solved, I ended up using a float data type. Mike55. Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.