Reference Selection in SQL query (where clause)

المشرف العام

Administrator
طاقم الإدارة
I keep raising errors with my where_clause in the 9th line of this script. FID is an Object ID field and I want the cursor to select whatever row it is currently pointing at. I don't know how to do this with proper syntax - any ideas?

#Make a layer out of the the original FC arcpy.MakeFeatureLayer_management(fc, 'Sales_lyr') #Use an update cursor when there is a value you need to change in the attribute table with arcpy.da.UpdateCursor('Sales_lyr', ["BOROUGH", "FID", "COUNT"]) as cursor: #For every row in the cursor, do the following for row in cursor: #Select the current row in the UpdateCursor arcpy.SelectLayerByAttribute_management('Sales_lyr', "NEW_SELECTION", "FID" = 'str(row[1]')

أكثر...
 
أعلى