Decimal VS money

Reply

Join Date: Jul 2005
Posts: 483
Reputation: campkev is an unknown quantity at this point 
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

Decimal VS money

 
0
  #1
May 9th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 22
Reputation: RipperJT is an unknown quantity at this point 
Solved Threads: 3
RipperJT RipperJT is offline Offline
Newbie Poster

Re: Decimal VS money

 
0
  #2
Jul 16th, 2008
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 3932 | Replies: 1
Thread Tools Search this Thread



Tag cloud for MS SQL
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC