获得多重结果的优雅方式 [英] Elegant way of getting multiple results
本文介绍了获得多重结果的优雅方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的桌子有5张是/否字段星期一,星期二,星期三,星期四,星期五。
我想从查询中得到以下结果。
如果所有5个字段均为True,则任何一天
如果所有5个字段都使用False" - 空白
如果说Mon,Wed&星期四或星期三或星期四,星期四是真的。
显然我可以用一些代码来做,但有没有办法在查询中做到这一点?
谢谢
Phil
I have a table with 5 Yes/No fields Mon, Tue, Wed, Thu, Fri.
I want the following results from a query.
If all 5 fields are True "Any day"
If all 5 fields ate False "" - Blank
If say Mon, Wed & Thu are True "Monday or Wednesday or Thursday"
I can obviously do it with a bit of code, but is there a way to do it within a Query?
Thanks
Phil
推荐答案
展开 | 选择 | Wrap | 行号
谢谢,Z,但是开关只返回一个结果(找到的第一个真实条件)
我正在寻找Mon,星期二&周四都是真的,返回3个值
我已经去了它,但它不漂亮。
Thanks, Z, but switch only returns one result (the first true condition that is found)
I am looking for if Mon, Tue & Thu are all true, to return 3 values
I have gone it, but it''s not pretty.
展开 | 选择 | Wrap | 行号
发布#2 ...结果#可以是计算值...
Post#2 ... The result# can be a calculated value...
然后你设置的东西(使用字段Monday = [M]等..):
Then you set something like (using field Monday = [M] etc..):
展开 | 选择 | Wrap | 行号
这篇关于获得多重结果的优雅方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文