gragra72

Using Where_clause with UpdateCursor and SearchCursor

Discussion created by gragra72 on Mar 3, 2011
Latest reply on Mar 3, 2011 by mzcoyle
Could you give me an example for using a Where_clause with UpdateCursor?I need to iterate for all features with the same code in a multipart FeatureClass.

Here is an example that  doesn???t work to me:
codici=[]
cur = arcpy.SearchCursor(data)
for feature in cur:
    cod = feature.HSMU
    codici.append(cod)
for i in range(len(codici)):
    cod = codici[i]
    where_clause = "[HSMU] = "+codici[i]

    upcur = arcpy.UpdateCursor(multidata,where_clause,'','','')
    for feature in upcur:
        n = arcpy.GetCount_management(multidata)


thanks

Outcomes