I have a layer created with the Multiple Ring Buffer tool in the Analysis Tools=>Overlay toolbox. The field, chosen by the tool, that has the radii of the distance rings is called, unsurprisingly, distance.
Now I make a many-to-one spatial join of a point dataset (the target) to this buffer dataset (the join), the aim being to find how many points lie in each buffer and to extract other statistics from the point dataset as a function of distance.
The result of this operation is a new layer, and it seems correct in all aspects bar one: the distance field has been set to zero.
This would seem to be a bug. Some spatial joins give one the option to record a distance, but there was no such option for this join. Th fact that the numbers are all zero anyway shows that nothing useful is being recorded. It is just wiping out data which I need for the next step in my analysis.
Obviously, the fix is simple. Take the multiple buffer output and rename distance as something else. That works and no new field named distance is created, thus confirming the fact that no useful data was being saved.