首先,感谢您点击。其次,请耐心等待,这有点尴尬。
好的。所以我在Excel中有两个表,其数据类似如下:
Organization | Code
------------------------+---------
University of Chicago | 123123
University of Maryland | 030393
Therapy Incorporated | 2324
Martians United | 022222
League of Superheroes | 94949
Organization | ID
----------------------------------------+---------
University of Chicago Medical Center | 1
University of California Dental | 9
Therapy Inc. | 3
League of Artificial Men | 4
League of Superheroes | 5
我已将此转移到Access,希望使用查询来使用INNER JOIN和LEFT 10左右组合数据,但现在我得到了这个:
Organization | Organization | ID | Code
------------------------+---------------------------------------+-------+-----------
University of Chicago | University of Chicago Medical Center | 1 | 123123
University of Chicago | University of California Dental | 9 | 123123
University of Maryland | University of Chicago Medical Center | 1 | 030393
University of Maryland | University of California Dental | 9 | 030393
Therapy Incorporated | Therapy Inc. | 3 | 2324
League of Superheroes | League of Superheroes | 5 | 94949
League of Superheroes | League of Artificial Men | 4 | 94949
有一些问题。首先,马里兰大学没有比赛,而是挑选了Chiago或CA大学的比赛。列出的单个记录多次列出。
除了创建新查询,然后找到合并这两个结果的方法之外,我也无法看到没有匹配的记录(Martians United)。
到目前为止我最接近的Access查询:
SELECT
[Organizations Not In PARTY].[Organization Name],
[Orgs In PARTY Table].Name,
[Organizations Not In PARTY].Count,
[Orgs In PARTY Table].ID
FROM
[Organizations Not In PARTY]
INNER JOIN
[Orgs In PARTY Table]
ON LEFT ([Organizations Not In PARTY].[Organization Name],15) LIKE LEFT ([Orgs In PARTY Table].[Name],15);
这导致重复和匹配,例如Univ。上面的芝加哥和马里兰州的例子。
除此之外,到目前为止我已尝试过以下内容:
我有点绝望(这就是为什么我在这里:/)并且我可能会开始手动完成所有~3,000条记录。我很乐意买些咖啡作为指导。