问题描述
我有ACCESS 2010作为前端和SQL Server 2014上运行的表。我有查询,我有列的划分。值原来是双倍的,带有两位小数。迁移到SQL服务器后,得到的结果如下:140,20-140,15 = 0,04。当我点击
colums值时,它会变为0,04999999。因此,Access会降低值。在服务器上,值存储为float。当我将服务器数据类型更改为实数时,数字被访问解释为140,19和140,14,但除数结果为0,05。如何解决
这个有正确的值并除以结果?
Hi, I have ACCESS 2010 as front end and tables running on SQL server 2014. I have query where I have divide of columns. Values are originaly double's with two decimals. After migrating to SQL server I got results like this: 140,20-140,15 = 0,04. When I click the colums value, it changes to 0,04999999. So Access is rounding values down. On server values are stored as float. When I changed server data type to real, numbers were interpreted by access as 140,19 and 140,14 but divide result was 0,05. How can I solve this to have correct values and divide results?
我用于数据的查询用2位小数修复,它由在一列中显示值的子查询组成第二列显示上一行的值。当我单击这些字段时,值是稳定的,不会更改为周期性数字(如4,99999)
Query that I use for data are fixed with 2 decimals and it consists of subquery that shows value in one columns and second column shows value of previous row. When I click these fields, value is stable and does not change to periodical number (like 4,99999)
推荐答案
您可以在这里开始探索:https://en.wikipedia.org/wiki/Floating-point_arithmetic
You might begin your exploration here: https://en.wikipedia.org/wiki/Floating-point_arithmetic
这篇关于查询是从SQL服务器舍入数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!