pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Money Data Type
2+ messages / 2 participants
[nested] [flat]

* Money Data Type
@ 1998-06-03 16:55  Len Morgan <len-morgan@xroadstx.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Len Morgan @ 1998-06-03 16:55 UTC (permalink / raw)
  To: pgsql-sql

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().

Thanks in advance.

Len Morgan




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [SQL] Money Data Type
@ 1998-06-04 10:23  Jose' Soares Da Silva <sferac@bo.nettuno.it>
  parent: Len Morgan <len-morgan@xroadstx.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Jose' Soares Da Silva @ 1998-06-04 10:23 UTC (permalink / raw)
  To: Len Morgan <len-morgan@xroadstx.com>; +Cc: pgsql-sql

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'




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1998-06-04 10:23 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-06-03 16:55 Money Data Type Len Morgan <len-morgan@xroadstx.com>
1998-06-04 10:23 ` Jose' Soares Da Silva <sferac@bo.nettuno.it>

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