Rounding issues

  • Hello,

    I am having issues rounding this number. I have a number that is a float (0.981) and I need to convert it to read (98.1) or (98.10). I have tried rounding, but the decimal place does not move over. Any help would be appreciated.

    Thanks

  • DaveDB (11/25/2013)


    Hello,

    I am having issues rounding this number. I have a number that is a float (0.981) and I need to convert it to read (98.1) or (98.10). I have tried rounding, but the decimal place does not move over. Any help would be appreciated.

    Thanks

    Generally this would be considered a display (front end) issue and not an SQL issue. You are not rounding. You are changing the location of the decimal place.

    SELECT percentage * 100.0 from . . .

    You may need to apply round to the result of the multiplication.

    __________________________________________________________________________________________________________
    How to Post to get the most: http://www.sqlservercentral.com/articles/Best+Practices/61537/

  • Thank you so much. You are correct, this is not a rounding issue, that's why it wasn't working! Awesome!

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

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