Subject Re: [ib-support] Wierd math???
Author Joe Martinez
>what firebird/interbase version and what client tool/component set are you
>using ?

FB 1.0, and IBObjects

>what is the data type of your txamount column ?

Double Precision

>what happens if you explicitly cast your SUM statement ?
>
>select CAST(sum(txamount) AS Decimal(9,2)) from laytransactions where
>layid = 5

That gives an error (invalid column reference), but this:

select sum(cast (txamount AS Decimal(9,2))) from laytransactions where
layid = 5

works perfectly.

-Joe