Received: from proxy.bazzanese.com (root@ip135.tol11.interbusiness.it [195.120.106.135]) by hub.org (8.8.8/8.7.5) with ESMTP id FAA05981 for ; Thu, 4 Jun 1998 05:19:12 -0400 (EDT) Received: from localhost (sferac@localhost) by proxy.bazzanese.com (8.8.8/8.8.8/Debian/GNU) with SMTP id KAA01030; Thu, 4 Jun 1998 10:23:52 GMT Date: Thu, 4 Jun 1998 10:23:52 +0000 (UTC) From: "Jose' Soares Da Silva" X-Sender: sferac@proxy.bazzanese.com To: Len Morgan cc: pgsql-sql@postgreSQL.org Subject: Re: [SQL] Money Data Type In-Reply-To: <35757FF9.C2D22CBD@bbs.xroadstx.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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'