设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 2473|回复: 3
打印 上一主题 下一主题

[查询] 查询表中设置运算后如何数值取整

[复制链接]
跳转到指定楼层
1#
发表于 2010-4-14 21:06:57 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我在查询设计中设置运算后出现小数,如何设置小数位数和取整?请教各位!
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖 订阅订阅

点击这里给我发消息

2#
发表于 2010-4-14 21:34:41 | 只看该作者
取整函数:int
关于四舍五入,可搜索一下有关讨论
3#
 楼主| 发表于 2010-4-14 22:16:04 | 只看该作者
我用的是最笨的办法,SQL语句如下,请指导一下,Int函数应写在那个位置?先谢了!

SELECT 计划与捆包对应.箱号(系统番号), 计划与捆包对应.捆包材名, 计划与捆包对应.客户, 计划与捆包对应.制品品番, 计划与捆包对应.入数, [计划与捆包对应].[1]/[入数] AS 1, [计划与捆包对应].[2]/[入数] AS 2, [计划与捆包对应].[3]/[入数] AS 3, [计划与捆包对应].[4]/[入数] AS 4, [计划与捆包对应].[5]/[入数] AS 5, [计划与捆包对应].[6]/[入数] AS 6, [计划与捆包对应].[7]/[入数] AS 7, [计划与捆包对应].[8]/[入数] AS 8, [计划与捆包对应].[9]/[入数] AS 9, [计划与捆包对应].[10]/[入数] AS 10, [计划与捆包对应].[11]/[入数] AS 11, [计划与捆包对应].[12]/[入数] AS 12, [计划与捆包对应].[13]/[入数] AS 13, [计划与捆包对应].[14]/[入数] AS 14, [计划与捆包对应].[15]/[入数] AS 15, [计划与捆包对应].[16]/[入数] AS 16, [计划与捆包对应].[17]/[入数] AS 17, [计划与捆包对应].[18]/[入数] AS 18, [计划与捆包对应].[19]/[入数] AS 19, [计划与捆包对应].[20]/[入数] AS 20, [计划与捆包对应].[21]/[入数] AS 21, [计划与捆包对应].[22]/[入数] AS 22, [计划与捆包对应].[23]/[入数] AS 23, [计划与捆包对应].[24]/[入数] AS 24, [计划与捆包对应].[25]/[入数] AS 25, [计划与捆包对应].[26]/[入数] AS 26, [计划与捆包对应].[27]/[入数] AS 27, [计划与捆包对应].[28]/[入数] AS 28, [计划与捆包对应].[29]/[入数] AS 29, [计划与捆包对应].[30]/[入数] AS 30, [计划与捆包对应].[31]/[入数] AS 31
FROM 计划与捆包对应;
4#
 楼主| 发表于 2010-4-14 22:28:55 | 只看该作者
版主,谢了,我用了最笨的办法,在每一个计算加了INT函数,谢谢!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-11-18 02:51 , Processed in 0.106871 second(s), 27 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表