Inserting Money Types

Поиск
Список
Период
Сортировка
От Greg Lindstrom
Тема Inserting Money Types
Дата
Msg-id 20061102170225.IYFV27379.ispmxmta09-srv.windstream.net@webmail-relay.alltel.net
обсуждение исходный текст
Ответы Re: Inserting Money Types  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Hello-

I am running postgres 8.0.8 on a Gento system and am having trouble updating a column of type money (yes, I know it's
depricatedbut I have to work with an existing database).  When we do the initial INSERT statement and pass in a float
itworks fine, but I am writing a routine that takes values from a varchar field of another table and attempts to update
themoney field and I am told I need to cast it.  When I attempt to cast it I'm told that I can't cast a char to money,
floatto money, or numeric to money!   

Is there any way I can get this char value to UPDATE into a money datatype?  If not, we may have to convert our tables
touse numeric, but that will be a very big deal. 

Thanks for your help

Greg Lindstrom


В списке pgsql-novice по дате отправления:

Предыдущее
От: "Lenorovitz, Joel"
Дата:
Сообщение: Trouble with plpgsql generic trigger function using special variables
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Inserting Money Types