Re: [GENERAL] Money

Поиск
Список
Период
Сортировка
От Bill Sneed
Тема Re: [GENERAL] Money
Дата
Msg-id 367464CE.3148C25B@mint.net
обсуждение исходный текст
Ответ на Re: [GENERAL] Money  (Bob Dusek <bobd@palaver.net>)
Список 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 по дате отправления:

Предыдущее
От: Kwangmin Lee
Дата:
Сообщение: unsubscribe
Следующее
От: "Hiroshi Inoue"
Дата:
Сообщение: RE: [GENERAL] TODO list elements