Results 1 to 4 of 4

Thread: Float vs. Decimal

  1. #1
    Jim Craddock Guest

    Float vs. Decimal

    We are having problems with rounding errors on large monetary calculations in sql server 6.5

    The calculations include float fields (for volumes and unit of measure conversions in product movements). I was wondering if the float being "approximate" could be the problem.

    IF it is, why would I want to store things as a float instead of a dec(28,14)?
    Is it faster to compute numbers stored as approximate binaries? Will we see a big performance hit if we switch some of the table`s field`s to decimals?

    Thanks in advance.

  2. #2
    Join Date
    Aug 2003
    Posts
    1
    did you get the answer, i have the same question

  3. #3
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    decimal uses more bytes than float to store data.

    SQL Server is not very efficient in numerical calculations. You should consider doing calculations in your middle tier/front end.

  4. #4
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    6.5 is not supported by MS.

    Does this happen even in SQL 2000 when you use decimal?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •