Re: [GENERAL] Another Solution: Dividing Money - Mailing list pgsql-general

From Sferacarta Software
Subject Re: [GENERAL] Another Solution: Dividing Money
Date
Msg-id 16606.981203@bo.nettuno.it
Whole thread Raw
In response to Another Solution: Dividing Money  (Bob Dusek <bobd@palaver.net>)
List pgsql-general
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'-



pgsql-general by date:

Previous
From: "David"
Date:
Subject: Can PostgreSQL handle this?
Next
From: Javier E Polo
Date:
Subject: revoke!!!