Обсуждение: Another Solution: Dividing Money

Поиск
Список
Период
Сортировка

Another Solution: Dividing Money

От
Bob Dusek
Дата:
Well... well.  uhhh well.

My feeble mind has managed to work out another very, very simple solution
to this:

select price, price / 2::float as halfprice from item_money;

All of my fretting and worrying, and the answer was that simple.

daggonnit,

Bob


Re: [GENERAL] Another Solution: Dividing Money

От
Sferacarta Software
Дата:
Hello Bob,

mercoledì, 2 dicembre 98, you wrote:


BD> Well... well.  uhhh well.

BD> My feeble mind has managed to work out another very, very simple solution
BD> to this:

BD> select price, price / 2::float as halfprice from item_money;

BD> All of my fretting and worrying, and the answer was that simple.

BD> daggonnit,

BD> Bob

Which version of Postgres are you using?
on my v6.4 it works well:

rova=> select sal, sal/2 from emp;
sal      |?column?
---------+---------
$1,600.00|$800.00
$2,850.00|$1,425.00
$950.00  |$475.00
$1,250.00|$625.00
$1,500.00|$750.00
$1,250.00|$625.00
(6 rows)

-Jose'-