博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Microsoft access SUM function round decimal number to Integer
阅读量:6787 次
发布时间:2019-06-26

本文共 803 字,大约阅读时间需要 2 分钟。

Recently I met a strange problem. That tooks me a few hours to dig out the cause.

I has a textbox in a access form, the textbox value is SUM([price]), the price can be decimal number, but the textbox only display the integer. For example, the price is 1.1 and the other price 1.3. Then the textbox display me 2.

The field price is a calculated value which is ItemPrice * Discount / 100, ItemPrice and Discount are fields in physical table.

I found ItemPrice data type is Long Integer. I changed it to Single. Then textbox display correct value with decimal point.

So my summary is if do aggregation function to a calculated field, the aggregration function force return data type to longest data type among physical fields involved.

转载于:https://www.cnblogs.com/yangbin990/archive/2009/05/12/1455135.html

你可能感兴趣的文章
MySQL查询
查看>>
Linux学习笔记04
查看>>
Unity3d热更新之下载
查看>>
设计模式----备忘录模式
查看>>
如何用chkconfig查看手动输入,跳出循环的四个命令
查看>>
ORM了解知识
查看>>
[NHibernate]ISessionFactory配置
查看>>
jboss服务器修改端口说明
查看>>
个人开发—进度记录(三)
查看>>
Idhttp中get与Post的区别
查看>>
比基尼新娘沉醉花海之爱。(组图)
查看>>
jdk1.8.0环境变量设置
查看>>
attempted to return null from a method with a primitive return type (Double).
查看>>
【leetcode】31. Next Permutation
查看>>
《会说话的代码》英文能力的提升
查看>>
HDOJ_ACM_命运
查看>>
SpringMVC-拦截器
查看>>
MVC5+EF6 简易版CMS(非接口) 第一章:新建项目
查看>>
弹出窗口2window.open()---2011-11-11 09:47 window.open 打开窗口最大化
查看>>
水平居中
查看>>