truncated numeric data

From: "Marc Zandvliet" <marc(at)auroraworks(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: truncated numeric data
Date: 2001-01-30 17:46:27
Message-ID: LJEMIBPPIBGEBAAPNFGKIEIGCBAA.marc@auroraworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I've defined a field as numeric(5,2) - I'm using it for monetary amounts.

After inserting values such as 8.50 or 29.00 into the database, a select
from within psql gives the correct amount, i.e.
-------
23.65
21.25
8.50
31.95
25.15
20.75
18.75
32.60
52.10
29.00

However, windows based queries (through pgAdmin) drop trailing zeros, such
as 8.5 or 29

Can someone suggest how to prevent this from happening? Obviously I don't
want to display prices without the decimals. Is it something to do with the
odbc driver (Insight 6.5 & Postgresql 6.5)?

Any help is greatly appreciated.

Marc

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Alfred Perlstein 2001-01-30 19:10:40 Re: Best WebInterface...?
Previous Message Francisco Reyes 2001-01-30 15:56:33 Re: When replication?