CAST Problem: Difference between insert a tuple in a table by function and by datasheet

Поиск
Список
Период
Сортировка
От DI Hasenöhrl
Тема CAST Problem: Difference between insert a tuple in a table by function and by datasheet
Дата
Msg-id 00b301c0fb14$e98b1da0$01011eac@irina
обсуждение исходный текст
Список pgsql-sql
Now,I found the problem, but I don't know how to solve. It depends on type float8.
I changed all type float to float8
 
In my function I make the following calculation:
.............
update KalkPreislisten_float8 SET  kp_ep = rkontingent.k_ep::float8        -- this works correct
 
but I have to calculate with a numeric type too (rwaehrung.w_euro is numeric(9,5))
....................
update KalkPreislisten_float8 SET  kp_ep = rkontingent.k_ep::float8 *rwaehrung.w_euro::float8         -- this doesn't work
 
Please, can anyone tell me, how I must cast this numeric type to get float8
 
Many thanks in advance
Irina
                 

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

Предыдущее
От: "Richard Huxton"
Дата:
Сообщение: Re: pl/pgsql question (functions)
Следующее
От: "Markus Bertheau"
Дата:
Сообщение: select tbl1.attr1, number of tuples where tbl2.attr1=tbl1.attr1