943,949 Members | Top Members by Rank

Ad:
  • MS SQL Discussion Thread
  • Unsolved
  • Views: 8510
  • MS SQL RSS
May 9th, 2008
0

Decimal VS money

Expand Post »
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
Similar Threads
Reputation Points: 14
Solved Threads: 19
Posting Pro in Training
campkev is offline Offline
484 posts
since Jul 2005
Jul 16th, 2008
0

Re: Decimal VS money

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
Reputation Points: 13
Solved Threads: 3
Newbie Poster
RipperJT is offline Offline
23 posts
since Jan 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MS SQL Forum Timeline: database design
Next Thread in MS SQL Forum Timeline: Particular update





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC