AnsweredAssumed Answered

SearchCursor where clause

Question asked by Tonyalmeida on Mar 19, 2013
Latest reply on Mar 19, 2013 by mzcoyle
I a script that selections by location, but after that i need it to search the selected in the "Year" field anything >= to 2009, then copy those features out. Any help would be very appreciated.

Her is what i currently have but i am getting an error of nameerror: name 'rows is not defined.

arcpy.SelectLayerByLocation_management(CCP, "WITHIN_A_DISTANCE", SP2, "1 MILE", "NEW_SELECTION")
if int(arcpy.GetCount_management("CURRENT_CUPS").getOutput(0)) > 0:
    rows.arcpy.SearchCursor(CCP, "YEAR >=2009", "", "YEAR", "YEAR A")
    for row in rows:
        arcpy.CopyFeatures_management("CURRENT_CUPS", "CUPS")