Subject | RE: [firebird-support] Re: problem with sum(), seeking round udf function ref/eDN2032575133 |
---|---|
Author | dennis |
Post date | 2007-07-19T11:53:11Z |
Thank you, it works by this way.
_____
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Jeffrey Bradley
Sent: Thursday, July 19, 2007 1:38 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: problem with sum(), seeking round udf
function ref/eDN2032575133
Couldn't you use the following
select cast((fbround(sum(total_final)) as numeric(8.2)) from reg_lines
Jeff
--- In firebird-support@ <mailto:firebird-support%40yahoogroups.com>
yahoogroups.com, "dennis" <dennis@...> wrote:
_____
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Jeffrey Bradley
Sent: Thursday, July 19, 2007 1:38 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: problem with sum(), seeking round udf
function ref/eDN2032575133
Couldn't you use the following
select cast((fbround(sum(total_final)) as numeric(8.2)) from reg_lines
Jeff
--- In firebird-support@ <mailto:firebird-support%40yahoogroups.com>
yahoogroups.com, "dennis" <dennis@...> wrote:
>the most
> Error: Integer overflow. The result of an integer operation caused
> significant bit of the result to carry[Non-text portions of this message have been removed]
>
>
>
> 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]
>