Access查询中的IIf语句存在问题 [英] A problem with an IIf statement in Access query

查看:229
本文介绍了Access查询中的IIf语句存在问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




在Access查询中,我使用下面的IIf语句计算两个日期之间的时间;这被定义为[Period1]:

Hi,

In an Access query I am using an IIf statement below to calculate the time between two dates; this is defined as [Period1]:

展开 | 选择 | Wrap | 行号

推荐答案

尝试使用括号来制作你的意图明确:
Try using parentheses to make your intention clear :
展开 | 选择 < span class =codeDivider> | Wrap | 行号


我很害怕那是行不通的。在我发布之前,我曾尝试使用括号来分解语句(虽然不完全按照你的建议)但是也没有用。
I''m afraid that didn''t work. I had tried using parentheses to break up the statement before I posted (although not exactly as you suggest) but that didn''t work either.


如果有帮助就返回0记录,其中[DateTreatmentStarted1]不为null,但不是那些为null的记录。
If it helps a 0 is returned for the records where [DateTreatmentStarted1] is not null but not for those where it is null.


这篇关于Access查询中的IIf语句存在问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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