From: Jose' Soares Da Silva <sferac@bo.nettuno.it>
To: Len Morgan <len-morgan@xroadstx.com>
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Money Data Type
Date: Thu, 4 Jun 1998 10:23:52 +0000 (UTC)
Message-ID: <Pine.LNX.3.96.980604102140.945D-100000@proxy.bazzanese.com> (raw)
In-Reply-To: <35757FF9.C2D22CBD@bbs.xroadstx.com>
On Wed, 3 Jun 1998, Len Morgan wrote:
> I am having a problem converting a data type of money to type float.
> After 'greping' all the documentation directorys, I can't find a
> reference to
> "money", "Money", or "MONEY" but I know it's in there somewhere because
> I have a money type (a mistake I now realize) in my database.
>
> How do I convert from type money to type float and back?
>
> float4(moneyfield) gives me a huge number (something e+09). I get
> similar
> results with float8, float, and even int4().
>
CAST (yMONEY AS float4)
CAST (yMONEY AS float8)
CAST (yMONEY AS int2)
CAST (yMONEY AS int4)
Ciao, Jose'
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-sql@postgresql.org
Cc: sferac@bo.nettuno.it, len-morgan@xroadstx.com
Subject: Re: [SQL] Money Data Type
In-Reply-To: <Pine.LNX.3.96.980604102140.945D-100000@proxy.bazzanese.com>
References: <35757FF9.C2D22CBD@bbs.xroadstx.com> <Pine.LNX.3.96.980604102140.945D-100000@proxy.bazzanese.com>
* 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