确定某个值是否有条件存在? [英] determining if a value is not present conditionally?

查看:74
本文介绍了确定某个值是否有条件存在?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个查询,告诉我们转移是否忘记了日志信息...


我们有3个班次进入验证任务,这恰好是每个班次都一样。我们有一些健忘的人,他们似乎不记得在完成任务时记录他们的任务,所以我必须回过头来找出哪个班次忘记输入任务完成。


所以表记录了日期,用户名,班次,任务名称和完成状态。


我相信这很简单......我只是错过了它。 ..但简单通常是我最艰巨的任务!


我试图使用任务进行查询然后转移,而不是1或不是2或不是3


但是它不起作用,仍会显示每条记录......我只想让它完成转换未能输入数据的任务,并告诉我哪个班次丢失了


甚至尝试做一个iif语句... iif(移位不喜欢1,错过1,iif(移位不喜欢2,错过2,iif(移位)不喜欢3,错过3)))那也没有用。



有什么想法吗?

I am trying to create a query that will tell us if a shift forgot to log info...

We have 3 shifts that enter verification of tasks which happen to be the same on each shift. We have some forgetful folks who can''t seem to remember to log their tasks as they complete them, so I have to go back thru and figure out which shift forgot to input their task as complete.

so the table records the date, user name, shift, task name and completion status.

I am sure this is simple... and I am just missing it... but simple is often my hardest task!

I have tried to query using the task and then shift, not 1 or not 2 or not 3

but it doesn''t work, still brings up every record... i only want it to pull in the task where a shift failed to enter data, and tell me which shift was missing

even tried doing an iif statement... iif(shift not like "1", "missed 1", iif(shift not like "2", "missed 2", iif(shift not like "3", "missed 3"))) and that didn''t work either.


Any ideas?

推荐答案

您可以尝试查看以下主题:显示未使用的数字。它具有显示不存在的记录的相同的一般想法。基本上,你不能返回那些不存在的记录,因此我们使用烟雾和镜子来创建记录,并且只显示与真实记录不匹配的记录。
You might try looking at the following thread: Show numbers not used. It has the same general idea of displaying records that aren''t there. Basically, you can''t return records that aren''t there, so we used smoke and mirrors to create the records and the only displayed the ones that didn''t match up to the real records.


我正在尝试使用不匹配的查询向导并且没有运气...


我的用户在完成任务时填充了一个表,字段特别是我希望验证是移位,

表数据如下:

任务,日期,TechID,班次,完成

i制作了一个必需表格名为shiftchecker的它有以下几个字段:

Shift和任务


如果第3班错过任务,就没有记录(显然)

所以我想知道这种情况何时发生。


无法匹配的查询说明如下:

从表中创建一个不匹配数据的连接来自具有比较数据的表格


然后将您想要显示的字段放在要比较的字段上的查询参数

,你应该把是空的并取消选中显示按钮。


当我这样做时,根本没有任何内容,我知道应该有2条记录。我做错了什么?


我的sql看起来像这样:

I am trying to use the unmatched query wizard and having no luck...

I have a table that is populated by my users when they complete a task, the field in particular I am looking to validate is shift,
the tables data is as follows:
Task, Date, TechID, shift, complete

i made a "required table" named shiftchecker it has the following fields:
Shift and Task

if 3rd shift misses a task, there will be no record (obviously)
so I want to know when this happens.

the instructions for the unmatched query are:
create a join from table where the unmatched data is coming from to the table that has the comparison data

then put the fields you want displayed in the query params
on the field you wish to compare, you are supposed to put "is null" and uncheck the show button.

When I do this, nothing comes up at all, and I know there are 2 records that should. what am I doing wrong?

my sql looks like this:

展开 | 选择 | 换行 | 行号


我看到两个选项。您可以在数据表中添加已完成复选框字段,然后为每个班次预先填充任务。然后,每个班次只需检查他们已完成任务的方框。然后,您可以运行查询以查看未完成字段检查的过去日期。


另一个选项使用我在上一篇文章中提供的链接中的帮助。创建一个名为tbl_expansiondigits的表,其中一个字段名为Digit。使用数字0到9(总共十条记录)填充表格。现在将以下SQL复制到一个新查询中:
I see two options. You could add a Completed checkbox field to your data table and then prepopulated the tasks for each shift. Each shift would then just check the box that they have completed the task. You could then run your query for past dates that don''t have the completed field checked.

The other option utilizes the help in the link that I gave in my previous post. Create a table called tbl_expansiondigits with one field called Digit. Populate the table with the numbers 0 through 9 (total of ten records). Now copy the following SQL into a new query:
展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号


这篇关于确定某个值是否有条件存在?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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