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?
There are many reasons for the sql statement to be wrong. Firstly where is Points_UTM living?
fgdb, shapefile, pgdb, enterprise db etc.
I have often found it useful to actually make the sql select by hand, in the feature definition for example