问题

问题:虽然两个连接字段中的所有值均匹配,但无法连接所有记录

Last Published: December 6, 2024

描述

When joining tables with the option to keep all records, if all values in a field in one table match with all values in a field of another table, all records are included in the joined table. However, in some cases, when joining such tables, only some records are included in the joined table.

原因

This may caused by preceding spaces or trailing spaces in the values of one or both of the join fields.

解决方案或解决方法

Remove the preceding and trailing spaces from the values in the relevant fields before joining the fields.

  1. In the attribute table of the feature, right-click the header of the field that is used for joining, and click Field Calculator.
  2. Use the following Python expression on the relevant join field to remove all the trailing spaces.
!fieldname!.rstrip()
Note:
Change fieldname to the user's respective field name.
  1. Use the following Python expression to remove any preceding spaces from the values in the join field.
!fieldname!.lstrip()
Strip spaces
Note:
Apply these steps on both join inputs to ensure that preceding or trailing spaces are not hindering a proper join, and proceed with the join operation.

文章 ID: 000015477

接收通知并查找新问题或常见问题的解决方案

从我们全新的 AI 聊天机器人中获得简明答案和视频解决方案。

下载 Esri 支持应用程序

相关信息

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项