gpt4 book ai didi

sql - 具有多个条件的 IIF 语句

转载 作者:行者123 更新时间:2023-12-02 03:31:05 25 4
gpt4 key购买 nike

同意:

IIf([consents].[decision]=1,"grant",
IIf([consents].[allowbreaktheglass]=0,"deny""Default"),
IIf([consents].[AllowBreakTheGlass]=1 AND [consents].[Decision]=0,"emergency only"))

IIF 语句返回错误:

The expression you entered has a function containing the wrong number of arguments

同意的标准仅限于授予、拒绝和紧急情况。

最佳答案

IIF 语句的语法为:IIf ( expr , truepart , falsepart )您在以下 2 中缺少 falsepart:

尝试更改:IIf([consents].[allowbreaktheglass]=0,"deny""Default")

至:IIf([同意].[allowbreaktheglass]=0,"拒绝","默认")

and: IIf([consents].[AllowBreakTheGlass]=1 AND [consents].[Decision]=0,"仅限紧急情况")

至:IIf([consents].[AllowBreakTheGlass]=1 AND [consents].[Decision]=0,"仅限紧急情况","")

了解更多信息,请 Access :https://support.office.com/en-us/article/iif-function-32436ecf-c629-48a3-9900-647539c764e3

关于sql - 具有多个条件的 IIF 语句,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51846034/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com