AnsweredAssumed Answered

Invalid SQL statement?

Question asked by on Nov 15, 2018
Latest reply on Nov 16, 2018 by jborgion

I have the following line of code in my python script, (spaces inserted between quotation marks for readability):


arcpy.Select_analysis(Points_UTM, "fiftyPercent", " " " 'NEAR_DIST' <= 'dist50' " " ")


It creates a new feature class named "fiftyPercent", which is what I intended. But it has all the same features as the original layer, while I want it to only select and transfer half of the features. 


I suspect I made an error in the SQL statement, but I can't find any help as to why. According to the select_analysis help, the tool transfers all features if no SQL statement is used.


Is my suspicion correct? If so, how might I change the format or syntax of my SQL statement?