AnsweredAssumed Answered

Error 000358: Invalid Expression when trying to select layer by attribute

Question asked by tpylaw on Aug 21, 2018
Latest reply on Aug 21, 2018 by rvburton

I'm creating a script where I'm trying to select all the null values based on a specific field. The feature is joined with another feature, thus altering the title of fields to be FeatureName_FieldName. I want to keep these titles as I will be exporting the table and if I set qualified field names to False, the fields won't be able to be properly interpreted. 

 

            mayDevice = mayFeature+"_"+"DEVICE_ID"

            whereClause = mayDevice "IS NULL"

            arcpy.SelectLayerByAttribute_management(mayFeature, "NEW_SELECTION", whereClause)

 

I don't know how to include a variable in an "is null" expression. 

Outcomes