Re: [GENERAL] Money - Mailing list pgsql-general

From Bill Sneed
Subject Re: [GENERAL] Money
Date
Msg-id 367464CE.3148C25B@mint.net
Whole thread Raw
In response to Re: [GENERAL] Money  (Bob Dusek <bobd@palaver.net>)
List pgsql-general
Bob Dusek wrote:
>
> Hey there,
>
> I had some similar problems recently, try this
>
> select someid, somemoneyfield * 2::float as product from table;
>
> You cannot multiply money * money, apparently.  But, money * float seems
> to work fine.  Same goes with division:
>
> select someid, somemoneyfield / 2::float as quotient from table;
>
> Hope this helps.
>
>
Thanks Bob...to some extent it does...I was able to do ---
somemoneyfield *2::int2 or /2::int2 but got a complaint when trying a
floating point datatype....but if it works for you it must be me!  :-)

....TNX...Bill

pgsql-general by date:

Previous
From: Kwangmin Lee
Date:
Subject: unsubscribe
Next
From: "Hiroshi Inoue"
Date:
Subject: RE: [GENERAL] TODO list elements