Subject Re: [ib-support] Re: Problems with Numeric(18,5)
Author Holger Klemt
select
money1,money1/cast(1.95583 as double precision),
money2,money2/cast(1.95583 as double precision),
money3,money3/cast(1.95583 as double precision),
money4,money4/cast(1.95583 as double precision)
from MONEY_TABLE

gives the correct result, but why is the other way
such a problem. The new numeric type cannot
be only valid for storage, simple math operation
should be ok too.

--
IBExpert - The most Expert for InterBase --- http://www.ibexpert.com
HK Software - Holger Klemt - Huntestrasse 15 - D-26135 Oldenburg
Telefon Telefax +49 700 IBEXPERT (42397378) www.h-k.de
Schulungen - Projektunterst�tzung - Delphi - InterBase - AS/400
<guido.klapperich@...> schrieb im Newsbeitrag
news:3C6CC2AA.896631F0@......
> One additional test:
>
> CREATE TABLE MONEY_TABLE (
> MONEY1 NUMERIC(18,5),
> MONEY2 NUMERIC(18,4),
> MONEY3 NUMERIC(18,3),
> MONEY4 NUMERIC(18,2));
>
> INSERT INTO MONEY_TABLE (MONEY1,MONEY2,MONEY3,MONEY4) VALUES
(-70000,-700000,-7000000,-70000000);
>
> select
> money1,money1/1.95583,
> money2,money2/1.95583,
> money3,money3/1.95583,
> money4,money4/1.95583
> from MONEY_TABLE
>
> All results are wrong :-(
>
>
> Guido
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>