Subject | Re: [firebird-support] Overflow on multiplying decimals |
---|---|
Author | Ann W. Harrison |
Post date | 2010-07-28T14:02:38Z |
Maya Opperman wrote:
result doesn't overflow.
Good luck,
Ann
>You have to cast the individual fields so the intermediate
>
> IQTY decimal(18,3) = 100.000
> IPRICE decimal(18,2) = 4,039,250,052,178.13
> OEXTENDEDPRICE decimal(18,2) will be 403,925,005,217,813.00 (still within 18 significant digits, 17 actually)
>
> I tried
>
> OExtendedPrice = cast((IPrice * IQty) as decimal(18,2));
>
result doesn't overflow.
Good luck,
Ann