Re: Rounding

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Chris Boget" <chris(at)wild(dot)net>
Cc: "PGSql Novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Rounding
Date: 2003-10-03 16:24:08
Message-ID: 26444.1065198248@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Chris Boget" <chris(at)wild(dot)net> writes:
> Is there a way, internal in PG, that you can round to the
> nearest half decimal (rounded up or down)? ie, I want to
> round 97.37 to 97.5 or 97.81 to 98.

Double the value, round to integer, divide by 2?

regards, tom lane

In response to

  • Rounding at 2003-10-03 15:26:11 from Chris Boget

Browse pgsql-novice by date

  From Date Subject
Next Message Joe Conway 2003-10-03 16:24:11 Re: Rounding
Previous Message Chris Boget 2003-10-03 15:26:11 Rounding