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

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 (view raw or flat)
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

pgsql-novice by date

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

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