| | |
Decimal VS money
Please support our MS SQL advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2005
Posts: 483
Reputation:
Solved Threads: 19
This isn't a problem as I have already solved the problem, just trying to figure out why it happened.
Ok I have a field that is type money. I wrote a stored procedure that updates this field, however, I made the datatype for the parameter to get passed in a decimal instead. It was working fine for a while in the development environment. Then we restored the dev from a backup of production. I created the stored procedure the same as it was before, but now it is rounding off the field to the nearest whole number? I'm guessing it is a setting somewhere, but I can't imagine what.
Any ideas?
Like I said, this isn't an emergency, because I've already fixed it by changing the parameter in the stored proc to a money
Ok I have a field that is type money. I wrote a stored procedure that updates this field, however, I made the datatype for the parameter to get passed in a decimal instead. It was working fine for a while in the development environment. Then we restored the dev from a backup of production. I created the stored procedure the same as it was before, but now it is rounding off the field to the nearest whole number? I'm guessing it is a setting somewhere, but I can't imagine what.
Any ideas?
Like I said, this isn't an emergency, because I've already fixed it by changing the parameter in the stored proc to a money
•
•
Join Date: Jan 2007
Posts: 22
Reputation:
Solved Threads: 3
Were you specifying the decimal precision and scale before? The default scale is zero.
http://msdn.microsoft.com/en-us/libr...2(SQL.80).aspx
http://msdn.microsoft.com/en-us/libr...2(SQL.80).aspx
![]() |
Similar Threads
- Decimal seperator - thousand seperator when using sql server (MS SQL)
- what is the easiest to use database software? (Database Design)
- class (C++)
- Program help please (C)
- c# or vb.net - how earn more? (C#)
- U$ 100.000.00 For Who Answer This Simple Question: (Java)
- My 1st C++ program advice needed (C++)
- c++ code help (C++)
- banking program -- weird numbers ...??? (C++)
- Double values with two decimal places (C++)
Other Threads in the MS SQL Forum
- Previous Thread: database design
- Next Thread: Particular update
| Thread Tools | Search this Thread |





