Re: need magic formula for euro conversion

From: Manfred Koizar <mkoi-pg(at)aon(dot)at>
To: tony <tony(at)animaproductions(dot)com>
Cc: postgres list <pgsql-general(at)postgresql(dot)org>
Subject: Re: need magic formula for euro conversion
Date: 2002-06-05 17:20:55
Message-ID: iphsfu8l7o0mjho2kpk8bh27m6u4aent69@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 05 Jun 2002 17:14:10 +0200, tony <tony(at)animaproductions(dot)com> wrote:
>Hello,
>
>Does anyone out there in Euroland have the magic formula that will let
>me convert a decimal(12,2) column to another decimal(12,2) column with
>automatic rounding up or down to comply with the EURO conversion rules?

Tony,

SELECT e, (e * 13.7603::decimal(12,4))::decimal(12,2) AS ats
FROM eur;
e | ats
------+-------
1.00 | 13.76
0.10 | 1.38

This might solve part of your problem. Hope you get the direction.
Servus
Manfred

In response to

Browse pgsql-general by date

  From Date Subject
Next Message eric.jones 2002-06-05 18:15:02 EASY!!! Timestamp conversion & php
Previous Message Alejandro Delu 2002-06-05 17:13:50 How do I install Postgre on Windows NT?