Money Datatype

  • I am using the money datatype. SQL Server stored the money value using 4 decimal places. This is causing rounding issues in transactions involving multiple records.

    1. Is there some way of restricting the money datatype to store only upto 2 decimals, if not, is there some way to eliminate these rounding issues.

    2. Is there some way to find out all amounts that are using four digits after decimal ie 43.4375 as against 43.4300 and round them so that it would fix some of the issues

  • Use multiplication (*1000) and then division to find things = 00.

    Alternatively, change the datatype to numeric and limit to 2 decimals.

    Or add a trigger to round to 2 decimals.

    Steve Jones

    sjones@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/sjones

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply