Received: from email03.aon.at (WARSL401PIP5.highway.telekom.at [195.3.96.112]) by postgresql.org (8.11.3/8.11.1) with SMTP id f5MCEKa38049 for ; Fri, 22 Jun 2001 08:14:21 -0400 (EDT) (envelope-from i.hasenoehrl@aon.at) Received: (qmail 130032 invoked from network); 22 Jun 2001 12:14:16 -0000 Received: from n654p020.adsl.highway.telekom.at (HELO irina) ([62.47.25.180]) (envelope-sender ) by qmail3.highway.telekom.at (qmail-ldap-1.03) with SMTP for ; 22 Jun 2001 12:14:16 -0000 Message-ID: <00b301c0fb14$e98b1da0$01011eac@irina> From: =?iso-8859-1?Q?DI_Hasen=F6hrl?= To: , Subject: CAST Problem: Difference between insert a tuple in a table by function and by datasheet Date: Fri, 22 Jun 2001 14:14:39 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00B0_01C0FB25.ACD0CA20" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Archive-Number: 200106/96 X-Sequence-Number: 652 This is a multi-part message in MIME format. ------=_NextPart_000_00B0_01C0FB25.ACD0CA20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 =3D rkontingent.k_ep::float8 = -- this works correct but I have to calculate with a numeric type too (rwaehrung.w_euro is numeri= c(9,5)) .................... update KalkPreislisten_float8 SET kp_ep =3D rkontingent.k_ep::float8 *rwae= hrung.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 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 E-Mail: i.hasenoehrl@aon.at ------=_NextPart_000_00B0_01C0FB25.ACD0CA20 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Now,I found the problem, but I don't know = how to=20 solve. It depends on type float8.
I changed all type float to float8<= /DIV>
 
In my function I make the following=20 calculation:
.............
update KalkPreislisten_float8 SET  kp= _ep =3D=20 rkontingent.k_ep::float8        -- this = works=20 correct
 
but I have to calculate with a numeric typ= e too=20 (rwaehrung.w_euro is numeric(9,5))
....................
update=20 KalkPreislisten_float8 SET  kp_ep =3D rkontingent.k_ep::float8= =20 *rwaehrung.w_euro::float8       &= nbsp;=20 -- this doesn't work
 
Please, can anyone tell me, how I must cas= t this=20 numeric type to get float8
 
Many thanks in advance
Irina
           =       
E-Mail: i.hasenoehrl@aon.at
------=_NextPart_000_00B0_01C0FB25.ACD0CA20--