- I'm a little uncertain whether this question belongs here or on http://gis.stackexchange.com
Have an "AddJoin" that results in no shared records, which is not what I'm expecting. Is it because I'm using a text field for the join? Something else? I'm trying to do this on point features from featureclass layers in a file gdb and a shapefile (both expressed as TableViews) on which I've performed a arcpy.SelectLayerByAttribute_management(). No cursors are being used.
Thanks for any ideas. ArcGIS 10.0. Also, ArcMap crashes if I try a JoinField on the same fields.
>>> arcpy.GetCount_management("GagesII")
<Result '1'>
>>> for row in arcpy.SearchCursor("GagesII"):
... gageid=row.getValue("GAGE_ID")
...
>>> gageid
u'01170000'
>>> arcpy.GetCount_management("StreamGageEvent")
<Result '1'>
>>> for row in arcpy.SearchCursor("StreamGageEvent"):
... sourcefea=row.getValue("SOURCE_FEA")
...
>>> sourcefea
u'01170000'
>>> if gageid==sourcefea:
... print 'yes'
...
yes
>>>
>>> arcpy.AddJoin_management("GagesII", 'GAGE_ID', "StreamGageEvent", "SOURCE_FEA", "KEEP_COMMON")
<Result 'GagesII'>
>>>
>>> arcpy.GetCount_management("GagesII")
<Result '-1'>