Results 1 to 5 of 5
  1. #1
    Join Date
    May 2010
    Posts
    52

    Unanswered: rounding off craziness

    So i have 2 same tables, 1 in dev and 1 in prod. they both have some columns with a data type numeric 18,0. my problem is the prod table is rounding of numbers on columns with numeric 18,0, but the dev table is not rounding of, it is just ommiting the decimals. e.g prod 769.7645 is 770 in dev 769.7645 is 769.
    may someone explain to me why SQL Server is not rounding off in dev?

  2. #2
    Join Date
    Aug 2004
    Location
    Dallas, Texas
    Posts
    831
    Quote Originally Posted by mosdef View Post
    So i have 2 same tables, 1 in dev and 1 in prod. they both have some columns with a data type numeric 18,0. my problem is the prod table is rounding of numbers on columns with numeric 18,0, but the dev table is not rounding of, it is just ommiting the decimals. e.g prod 769.7645 is 770 in dev 769.7645 is 769.
    may someone explain to me why SQL Server is not rounding off in dev?
    Maybe sql query is using a convert function differently in each environment?

  3. #3
    Join Date
    May 2010
    Posts
    52
    Quote Originally Posted by corncrowe View Post
    Maybe sql query is using a convert function differently in each environment?
    that is my thought right now. wanted to see if they is a better explanation. thanks

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Probably not the cause but just in case, check for triggers on the production table that may be doing the rounding.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  5. #5
    Join Date
    Aug 2004
    Location
    Dallas, Texas
    Posts
    831
    Quote Originally Posted by mosdef View Post
    that is my thought right now. wanted to see if they is a better explanation. thanks
    Data storage wouldn't change. How it is represented is much more likely the culprit.

Posting Permissions

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