rounding down a number

From: "Michael" <mmcelarn(at)hotmail(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: rounding down a number
Date: 2007-03-30 21:38:53
Message-ID: BAY124-DAV157F327A8A70BEDF9BD775D8630@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

I'm trying to round down any number with a half, but keep the round function
for all other fractions.

For example

100.1 becomes 100

100.4 becomes 100

100.5 becomes 100 (this one would ordinarily round to 101)

100.6 becomes 101

100.9 becomes 101

Thanks, Mick

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Phillip Smith 2007-03-30 21:56:02 Re: rounding down a number
Previous Message David Monarchi 2007-03-30 21:20:06 Re: postgres 8.2 "end-of-copy marker corrupt"