简体   繁体   English

在MS-Access中查询“无匹配”关键字的语法吗?

[英]Query Syntax for `Without Matching` keyword in MS-Access?

I found a very strange looking query in one of the MS-Access databases today: 我今天在一个MS-Access数据库中发现了一个看起来很奇怪的查询:

SELECT Count([hrpersnl Without Matching T_Employees].EmpNo) AS [Count]
FROM [hrpersnl Without Matching T_Employees];

The Without Matching clause seems to me to be rather MS-Access specific syntax that differs from ANSI-SQL as a whole, it appears to me to be finding records that have no matches on the EmpNo field of both tables, but the T_Employees table does not have a EmpNo field, so I am probably wrong in my assumption about this. 在我看来, Without Matching子句似乎是特定于MS-Access的语法,与整个ANSI-SQL有所不同,对我来说似乎是在两个表的EmpNo字段上找到不匹配的记录,但是T_Employees表确实没有EmpNo字段,因此我对此的假设可能是错误的。

What does it actually do, and where is the documentation for it? 它实际上是做什么的,它的文档在哪里?

In an Access query, table/query and field names that 在Access查询中,表/查询和字段名称

  • contain spaces and "funny characters", or 包含空格和“有趣的字符”,或者

  • are Access reserved words 是访问保留字

must be enclosed in [square brackets]. 必须放在[方括号]中。 In this case, [hrpersnl Without Matching T_Employees] was a table or query name, not an expression involving the base tables hrpersnl and T-Employees . 在这种情况下, [hrpersnl Without Matching T_Employees]是一个表或查询名称,而不是涉及基本表hrpersnlT-Employees的表达式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM