Subject Re: problem with sum(), seeking round udf function ref/eDN2032575133
Author Jeffrey Bradley
Couldn't you use the following

select cast((fbround(sum(total_final)) as numeric(8.2)) from reg_lines

Jeff

--- In firebird-support@yahoogroups.com, "dennis" <dennis@...> wrote:
>
> Error: Integer overflow. The result of an integer operation caused
the most
> significant bit of the result to carry
>
>
>
> This error occurred during on execution of the follow query in order to
> round to 2 decimals
>
> select fbround(sum(total_final)*100)/100.00 from reg_lines
>
>
>
> The same error occurred without the fbround function
>
> select (sum(total_final)*100)/100.00 from reg_lines
>
>
>
> So the error is not in fbround but somewhere else!
>
>
>
> The same error occurred in simplest query like this (where have to many
> decimals)
>
> select ( 123.1234567890123456 * 100 ) / 100.00 from reg_lines
>
>
>
> Questions
>
> 1. How can we avoid this error?
> 2. Doesn't any body knows how any udf round function where can called
> with how many decimal will return?
>
>
>
> Regards Dennis
>
>
>
>
>
> [Non-text portions of this message have been removed]
>