Bug: The Spatial Join tool produces NULL results for some fields/features on ArcGIS 10 SP4
The Spatial Join tool does not populate fields in the output feature class correctly when some target features have no matching join features.
This issue has been fixed with the release of the ArcGIS 10.0 SP4 Spatial Join Tool Patch.
The problem is found in 10.0 SP4 but not in SP3 or earlier patch levels.
A Spatial Join is used to append fields from a 'Join' feature class to a 'Target' feature class, where the association is defined by a spatial relationship (intersects, contains, within, closest, etc.), rather than attribute matching. If every target feature is matched with at least one join feature, the fields in the output table are populated correctly.
However, if a target feature is not matched with any join feature, the fields in the output feature class attribute table are empty (or zero) in most cases, even for target features that were successfully matched with a join feature. Not only are the fields appended by the join empty, but also the fields of the target feature class in the output table are empty.
This issue is resolved in SP5 for 10.0. A patch is planned to be released around the end of April/early May 2012 that resolves this defect.
A model tool is provided that works around the issue in most scenarios: Toolbox with model tool
The the model tool functions as follows:
1. The tool Selects by Location all target features that have the desired spatial relationship with records in the join features.
2. The tool performs a Spatial Join only on the selected features, joining with the join features, which allows the joined fields to be populated correctly for the selected target features.
3. The selection on the target features is then 'switched' (inverted) so that only the non-matching target records are selected. Those target records are appended to the output of the Spatial Join, to get all the non-matching features into the output. The selection on the target feature class is then cleared.