Re: Rounding

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Rounding
Дата
Msg-id 26444.1065198248@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Rounding  ("Chris Boget" <chris@wild.net>)
Список pgsql-novice
"Chris Boget" <chris@wild.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

В списке pgsql-novice по дате отправления:

Предыдущее
От: "Chris Boget"
Дата:
Сообщение: Rounding
Следующее
От: Joe Conway
Дата:
Сообщение: Re: Rounding