Re: [GENERAL] Another Solution: Dividing Money

From: Sferacarta Software <sferac(at)bo(dot)nettuno(dot)it>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>, Bob Dusek <bobd(at)palaver(dot)net>
Subject: Re: [GENERAL] Another Solution: Dividing Money
Date: 1998-12-03 13:33:25
Message-ID: 16606.981203@bo.nettuno.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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'-

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David 1998-12-03 15:18:10 Can PostgreSQL handle this?
Previous Message The Hermit Hacker 1998-12-03 05:36:23 Re: [GENERAL] Text Databases