AnsweredAssumed Answered

SelctbyAttributes

Question asked by jay.kapalczynski on May 11, 2020
Latest reply on May 11, 2020 by bixb0012

Where am I going wrong here.

 

countiesFeatureClass = r"E:/ArcGISProjects/CountySelection/adminjk_NWTL@Rack30.sde/Counties_1_Dissolved"

queryCounties = arcpy.SelectLayerByAttribute_management(countiesFeatureClass,
                                                        'NEW_SELECTION',
                                                        '"FIPS2"=3 OR "FIPS2"=12')

# Write the selected features to a new featureclass
arcpy.CopyFeatures_management(queryCounties, 'countiesSelected')

 


Traceback (most recent call last):
File "E:\ArcGISProjects\CountySelection\Python\Update_v4.py", line 32, in <module>
'"FIPS2"=3 OR "FIPS2"=12')
File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\management.py", line 7744, in SelectLayerByAttribute
raise e
ExecuteError: Failed to execute. Parameters are not valid.
The value cannot be a feature class
ERROR 000840: The value is not a Raster Layer.
ERROR 000840: The value is not a Mosaic Layer.
Failed to execute (SelectLayerByAttribute).

Outcomes