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

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