Skip site navigation (1) Skip section navigation (2)

float8 and currency conversion

From: Silje Ausen <ausen(at)stud(dot)ntnu(dot)no>
To: pgsql-odbc(at)postgresql(dot)org
Subject: float8 and currency conversion
Date: 2003-02-18 08:39:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
I'm trying to export some tables from MS Access 97 via ODBC. I'm using
psqlODBC driver

Exporting tables through the ODBC connection works fine - until I get to
the tables that have currency fields.

The tables will still be exported if all the amounts end with 00 - i.e.
NOK 123,00 works fine. This is "translated" into 123 in my PostgreSQL

The real problem arises when there's a non zero digit after the comma.
Like NOK 123,40
If I try to export a table containing a currencyfield like that I get the
following error;

ODBC--call failed.
ERROR: Bad float8 input format '123,4' (#7)

So obviously float8 isn't what I want to translate my currencyfields as.
What data type SHOULD be used - and how do I tell the ODBC link that I
want to use a different translation than float8..?

Thanx :)


pgsql-odbc by date

Next:From: Dave PageDate: 2003-02-18 08:44:27
Subject: Re: Connecting to a specific Schema via ODBC.
Previous:From: Michael WeaverDate: 2003-02-18 06:56:16
Subject: Connecting to a specific Schema via ODBC.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group