pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Herouth Maoz <herouth@oumail.openu.ac.il>
To: JT Kirkpatrick <jt-kirkpatrick@mpsllc.com>
Cc: 'pgsql-interfaces@hub.org' <pgsql-interfaces@hub.org>
Subject: Re: [INTERFACES] RE: [ADMIN] float4
Date: Tue, 29 Jun 1999 11:28:40 +0300
Message-ID: <l03130300b39e32c008fd@[147.233.159.109]> (raw)
In-Reply-To: <01BEC186.BFA829C0.jt-kirkpatrick@mpsllc.com>

At 23:53 +0300 on 28/06/1999, JT Kirkpatrick wrote:


> ouch.  hard to think of dollars only when you are paying vendors,
> technicians, billing customers, etc.  surely i won't have to make an int
> field for the dollars and an int field for the cents!!!  the money field
> would work nicely if the odbc driver would handle it correctly!
>
> i forwarded this to the odbc list -- any idea why a money field can't be
> used from msaccess97 through the odbc??

Perhaps as a work around you should use an integer field, which is scaled
two places to the left? That is, if you have 300.52 dollars, you keep the
number 30052 in the field. Surely you can play around with the forms you
use, so that the real field will be hidden, and get its value from a
visible field multiplied by 100.

It becomes a problem if your sums can go beyond the 2^31 limit. But if you
have 6.4, you may use int8 and double your upper limit.

The problem with the money type is that queries on it return it with a
currency mark, which I'm sure is bad for odbc.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma





view thread (5+ messages)  latest in thread

Message-ID: <l03130300b39e32c008fd@[147.233.159.109]>
Permalink:  ../l03130300b39e32c008fd@%5B147.233.159.109%5D/
Also on:    postgresql.org/message-id/l03130300b39e32c008fd@[147.233.159.109]

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-interfaces@postgresql.org
  Cc: herouth@oumail.openu.ac.il, jt-kirkpatrick@mpsllc.com, pgsql-interfaces@hub.org
  Subject: Re: [INTERFACES] RE: [ADMIN] float4
  In-Reply-To: <l03130300b39e32c008fd@[147.233.159.109]>
  References: <01BEC186.BFA829C0.jt-kirkpatrick@mpsllc.com> <l03130300b39e32c008fd@[147.233.159.109]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox