I am currently wondering what is the fastest way of using Select By Attributes in arcpy. I have a GDB with a feature class that is quite big. This feature class has a field called CODE with values of type LONG.
I want to select 3 types of these features, namely the ones that have either 5020, 5601 or 8002 in the CODE field.
I tried running the following code:
SelectByAttribute=' "CODE" = ' 5020 ' OR "CODE" = ' 5601 ' OR "CODE" = ' 8002 arcpy.SelectLayerByAttribute_management("Bat_StudyArea", "NEW_Selection", SelectByAttribute)
I am getting a syntax error, but I am too blind to find the error.