Power function in an access query
am 08.04.2008 12:24:55 von colmkav
How can I change the following query in order to give the user the
precision choice rather than hard coded to 10 decimal places?
SELECT tblAmortiserSchedule.Identifier,
Sum(tblAmortiserSchedule.Percentage) AS SumOfPercentage
FROM tblAmortiserSchedule
GROUP BY tblAmortiserSchedule.Identifier
HAVING
(((Sum(tblAmortiserSchedule.Percentage))>100.000000000000000 01));
Re: Power function in an access query
am 08.04.2008 15:49:58 von Tom van Stiphout
On Tue, 8 Apr 2008 03:24:55 -0700 (PDT), colmkav
wrote:
I don't see anything here that is hardcoded to 10 decimals so I'm not
sure what you mean. I do see the last number as very fishy.
If you want to round to N digits, you first find a rounding function
that can do that (this newsgroup has posted them in the past), then
you ask the user for N, perhaps via a form.
select MyRoundFunction(MyField)
from etc.
MyRoundFunction would take the value and round it to N digits.
-Tom.
>How can I change the following query in order to give the user the
>precision choice rather than hard coded to 10 decimal places?
>
>SELECT tblAmortiserSchedule.Identifier,
>Sum(tblAmortiserSchedule.Percentage) AS SumOfPercentage
>FROM tblAmortiserSchedule
>GROUP BY tblAmortiserSchedule.Identifier
>HAVING
>(((Sum(tblAmortiserSchedule.Percentage))>100.00000000000000 001));