Skip site navigation (1) Skip section navigation (2)

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

From: DI Hasenöhrl <i(dot)hasenoehrl(at)aon(dot)at>
To: <pgsql-odbc(at)postgresql(dot)org>, <pgsql-sql(at)postgresql(dot)org>
Subject: CAST Problem: Difference between insert a tuple in a table by function and by datasheet
Date: 2001-06-22 12:14:39
Message-ID: 00b301c0fb14$e98b1da0$01011eac@irina (view raw or flat)
Thread:
Lists: pgsql-odbcpgsql-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
                 
E-Mail: i(dot)hasenoehrl(at)aon(dot)at

pgsql-odbc by date

Next:From: Richard HuxtonDate: 2001-06-22 16:08:25
Subject: Re: Difference between insert a tuple in a table by function and by datasheet
Previous:From: Dariusz PietrzakDate: 2001-06-22 10:15:09
Subject: RE: RE: Difference between insert by a function and per ha nd

pgsql-sql by date

Next:From: Kristoff BonneDate: 2001-06-22 12:51:28
Subject: What is a "tuple"
Previous:From: Markus BertheauDate: 2001-06-22 12:06:32
Subject: select tbl1.attr1, number of tuples where tbl2.attr1=tbl1.attr1

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group