如果那么表达式中的语句 [英] If then statements in an expression

查看:57
本文介绍了如果那么表达式中的语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(1)2月10日''14上午10:12

您好,


我正在尝试计算医院规模调整。以下是计算医院规模调整的方式:由于该组中最大的医院患者天数比最小医院多80倍,因此尺寸调整倍数设计为将差异压缩到2倍。尺寸乘数为1.0对于最小的医院,最大的医院为2.0,所有医院的比例为两者之间。


这是我进入Access查询设计视图的表达式,效果不佳:


Hos_Size_Adj:DMAX(PD)= 2 ,DMIN(PD)= 1


我不太确定如何在MAX值(2.0)和MIN值之间按比例放入医院大小的所有值(1.0)


(2)2月10日''14 02:43 PM

我正在尝试用几个IF写一个表达式然后声明并得到几个错误:

(1)Feb 10 ''14 10:12 AM
Hello,

I am trying to calculate hospital sizes adjustment. Here is how the hospital size adjustment is calculated: "Since the largest hospital in the group had 80 times more patient days than the smallest, the size adjustment multiplier was designed to compress the spread to a factor of 2. The size multiplier is 1.0 for the smallest hospital, 2.0 for the largest hospital, and proportionately in between for all hospitals."

Here is the expression I am entering into design view of Access query, with poor results:

Hos_Size_Adj: DMAX (PD)=2, DMIN (PD)=1

I''m not really sure how to put in the expression all of the values for hospital size proportionally in between MAX value (2.0) and MIN value (1.0)


(2)Feb 10 ''14 02:43 PM
I am trying to write an expression with several IF-Then statements and getting several errors:

展开 | 选择 | Wrap | 行号

推荐答案

好吧,对于其中一个,我没有看到任何虚假陈述,这是必需的。

http://office.microsoft.com/en-us/ac...001228853.aspx


此外,请确保按照以下顺序清理计算操作。我不确定[sumPD] / 133781 +1应该是([sumPD] / 133781)+ 1还是([sumPD] /(133781 + 1))
Well, for one, I don''t see any False Statements, which are required.

http://office.microsoft.com/en-us/ac...001228853.aspx

Also, make sure you clean up your calculations, by order of operations. I''m not sure if [sumPD]/133781 +1 is supposed to be ([sumPD]/133781) + 1 or ([sumPD]/(133781 + 1))


IIf(X,Y,Z)是具有三个参数的函数。这些都不是可选的。你的代码中的语法错误是因为你没有传递三个参数。


@Mark。

除了加法之外,它还具有更高的操作优先级。除非使用括号来更改订单,否则始终先处理。除非与BODMAS指定的标准优先顺序不同,否则不需要括号来显示处理顺序。
IIf(X,Y,Z) is a function with three parameters. None of which is optional. The syntax errors in your code are because you haven''t passed three parameters.

@Mark.
Division has a higher operational precedence than addition so will always be processed first unless parentheses are used to change the order. Parentheses are not necessary for showing the order of processing unless that differs from the standard order of precedence as specified by BODMAS.


@NeoPa - 我明白了。我真的很想知道这件事。我只是想提出一些建议,以防结果可能被误算了。


你的知识令我惊讶,NeoPa!
@NeoPa - I see. I really did wonder about that. I was just trying to suggest something in case maybe the results were miscalculated.

Your knowledge amazes me, NeoPa!


这篇关于如果那么表达式中的语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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