“不在”子查询的问题[英] Problem with "Not In" Subquery

本文是小编为大家收集整理的关于“不在”子查询的问题的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我在 MS Access 中使用子查询时遇到问题.子查询的目的是创建过去 6 个月内进行过医生检查的人员列表,并将他们排除在主查询之外.这就是我想出的:

展开|选择|换行|行号
解决方案
多少行子查询返回?
展开|选择|Wrap|行号

子查询返回65行

尝试为子查询使用不同的别名.现在主查询的 TI 别名与子查询的 TI 重叠,这可能是问题所在.或者完全不使用子查询的别名.

本文地址:https://www.itbaoku.cn/post/1050512.html

问题描述

I have a problem with using a subquery in MS Access. The purpose of the sub-query is to create a list of people who have had doctor exams in the past 6 months and exclude them from the main query. This is what I came up with:

Expand|Select|Wrap|Line Numbers

推荐答案

How many rows does the subquery return?
Expand|Select|Wrap|Line Numbers

The subquery returns 65 Rows

Try using a different alias for the subquery. Right now the main query''s TI alias overlaps with the subquery''s TI, that may be the problem. Or leave off the subquery''s alias altogether.