Casting money to numeric(10,2)

From: Ben Stringer <ben(at)burbong(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Casting money to numeric(10,2)
Date: 2001-01-11 02:00:46
Message-ID: 3A5D13CE.9B34DD36@burbong.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to migrate several tables from a 6.5.2 DB to a
7.0.2 DB, and having trouble casting money (in the old DB)
to numeric(10,2) prior to doing a pg_dump.

I can create a table in the 6.5.2 DB with fields of type
numeric(10,2), but when I try and insert into this table

Ie.

insert
into new (purchase_price)
select
purchase_price::numeric(10,2)
from
old
;

I get ERROR: No such function 'numeric' with the specified attributes

I tried the 6.5.2 documentation, but it looked to me like this should
work.

Any suggestions appreciated.

Cheers, Ben

--
_____________________________________________________________
Ben Stringer
Burbong Consultants P/L ACN 092 664 198
ben(at)burbong(dot)com http://www.burbong.com ph 0402 211 638

Browse pgsql-general by date

  From Date Subject
Next Message Ben Stringer 2001-01-11 02:10:56 Casting money to numeric(10,2)
Previous Message Lloyd Llewellyn 2001-01-11 01:40:26 PGAccess (or other GUI) RPM?