The solution to this question is not working for me.
My error message:
File "SumAreas.py", line 24, in
arcpy.SelectLayerByAttribute_management(fc, "NEW_SELECTION, '"CLASS_CODE" = "A"')
File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\management.py", line 6688, in
SelectLayerByAttribute raise e
ExecuteError: ERROR 000358:
Invalid expression Failed to execute (SelectLayerByAttribute).
Further message in Python Window's side window:
ERROR 000358: Invalid expression A column was specified that does not exist.
I am trying to select based on a column ("CLASS_CODE") which is of "String" type.
My line 24 (referenced in Error Message above):
arcpy.SelectLayerByAttribute_management(fc, "NEW_SELECTION", '"CLASS_CODE" = "A"')
I can confirm that feature class "fc" definitely has a column called "CLASS_CODE".
So if the column exists, and is spelled correctly, why am I getting this error?