Always round up

  • Hi all,

    I want to ALWAYS round up to the nearest whole number. The ROUND function won't do this. So for example:

    SELECT ROUND(170.1,0) will return 170. I want it to return 171

    SELECT ROUND(1.4999,0) will return 1. I want it to return 2

    Is there another way I should be doing this?

    Thanks,

    Strick

  • Use ceiling: select ceiling(170.1) -- will return 171

  • Great thanks!

    Strick

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

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