四舍五入的挫败感 [英] Rounding Frustration

查看:82
本文介绍了四舍五入的挫败感的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用Round函数将小数更改为

整数的查询。连续4年,事情总是以完全相同的方式舍入

数字,这样每当我更新我的图表时,

历史数据的百分比总是正是如此他们最后一次运行查询是
。现在,我的第一次我的

百分比都只是略微偏离我没有改变查询。

我唯一能想到的是它正在四舍五入数字

不同。我没有升级到新版本的Access或

任何东西,为什么会这样呢?数据类型都是长整数。

I have a query that uses the Round function to change decimals into
whole numbers. For 4 years straight the thing has always rounded the
numbers in exactly the same way so that whenever I update my graphs,
the percentages for the historical data are always exactly what they
were the last time I ran the query. Now, for the first time my
percentages are all just slightly off and I have not changed the query.
The only thing I can think of is that it is rounding the numbers
differently. I have not upgraded to a new version of Access or
anything, so why would this be? The data types are all long integer.

推荐答案

我知道Round()例程没有变化的。粘贴

你在消息中使用的公式,这样我们就可以看出是否有一些看起来不正确的东西。


-

Wayne Morgan

MS Access MVP

< dh ******** **@wrha.mb.ca>在消息中写道

news:11 ********************** @ g44g2000cwa.googlegr oups.com ...
There have been no changes in the Round() routine that I''m aware of. Paste
the formula(s) you''re using into a message so we can see if there is
something that doesn''t look right.

--
Wayne Morgan
MS Access MVP
<dh**********@wrha.mb.ca> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
我有一个查询,使用Round函数将小数更改为
整数。连续4年,事情总是以完全相同的方式舍入
数字,这样每当我更新我的图表时,历史数据的百分比总是完全是他们最后的数字。我运行查询的时间。现在,我的
百分比第一次只是略微偏离,我没有改变查询。
我唯一能想到的是,它是以不同的方式对数字进行四舍五入。我没有升级到新版本的Access或
任何东西,为什么会这样呢?数据类型都是长整数。
I have a query that uses the Round function to change decimals into
whole numbers. For 4 years straight the thing has always rounded the
numbers in exactly the same way so that whenever I update my graphs,
the percentages for the historical data are always exactly what they
were the last time I ran the query. Now, for the first time my
percentages are all just slightly off and I have not changed the query.
The only thing I can think of is that it is rounding the numbers
differently. I have not upgraded to a new version of Access or
anything, so why would this be? The data types are all long integer.



这是公式的一个例子。


Round([ SumOfHospital质量好] * 0.5)

Here is an example of the formula.

Round([SumOfHospital Quality Good]*0.5)


您是否知道Access用于舍入以5结尾的数字的算法

(in刚刚过去最不重要的地方)?

数字四舍五入到最接近的偶数 - 因此4.5轮到4,

但3.5也是四轮到4。 br />
我不知道这是否与你的情况有关,但是在你四舍五入的时候值得知道



正如其他人所说,它在很长很长的时间内都没有改变。


当然,如果你没有改变查询,那么问题是否是

你(或其他人)已经改变了任何数据?

你有早期数据集的备份副本吗?他们仍然会返回相同的数字吗?


< dh ********** @ wrha.mb.ca>在消息中写道

news:11 ********************** @ g44g2000cwa.googlegr oups.com ...
Are you aware of the algorithm Access uses for rounding numbers ending in 5
(in the place just past the least significant one)?
The number is rounded to the nearest even number - thus 4.5 rounds to 4,
but 3.5 also rounds to 4.
I don''t know whether this is relevant to your case, but it''s worth knowing
any time you''re rounding.
And as others have stated, it hasn''t changed in a long, long time.

Of course if you haven''t changed the query, the question arises whether
you''ve(or someone else has) changed any of the data?
Do you have backup copies of earlier datasets? Do they still return the
same numbers?

<dh**********@wrha.mb.ca> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
我有一个查询,使用Round函数将小数更改为
整数。连续4年,事情总是以完全相同的方式舍入
数字,这样每当我更新我的图表时,历史数据的百分比总是完全是他们最后的数字。我运行查询的时间。现在,我的
百分比第一次只是略微偏离,我没有改变查询。
我唯一能想到的是,它是以不同的方式对数字进行四舍五入。我没有升级到新版本的Access或
任何东西,为什么会这样呢?数据类型都是长整数。
I have a query that uses the Round function to change decimals into
whole numbers. For 4 years straight the thing has always rounded the
numbers in exactly the same way so that whenever I update my graphs,
the percentages for the historical data are always exactly what they
were the last time I ran the query. Now, for the first time my
percentages are all just slightly off and I have not changed the query.
The only thing I can think of is that it is rounding the numbers
differently. I have not upgraded to a new version of Access or
anything, so why would this be? The data types are all long integer.



这篇关于四舍五入的挫败感的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆