Subject Re: [IBO] working with large numbers
Author Svein Erling Tysvaer
Firebird doesn't support that kind of number. Try something like
select sum(cast(amount as numeric(9,3))*cast(price as numeric(9,3))
mtotal from orders

In case of followup questions, please ask at
firebird-support(at), ibobjects is a list for ibo
questions, and this question is general for Firebird/InterBase.


Metin Gonen wrote:
> Hi,
> I prepared a query "select sum(amont*price) mtotal from orders " using ibsql.
> Actually the mtotal is no more than 99 999 999 999.999
> amount is defined as numeric(18,6)
> price is defined as numeric(18,6) on database table.
> The biggest number in amount is 156 000.56
> The biggest number in price is 15 600.123
> When I run this query
> "ISC Error Code 335544779"
> "Integer overflow. The result of an integer operation caused the most significant bit of the result to carry"
> The error above occurs.
> How can I get rid of this ?
> Kind Regards,
> Metin Gonen