Wednesday, 17 July 2019

arcgis 10.1 - query syntax to select every multiple of nn record (shapefile)



I have data like multiples of 40.
40
80
120
160
200
and so on.



I would like to label every record that is a multiple of 100. I have tried a couple of methods and can't get them to work either as a query in the label or as a select statement.


"STATION" =  %00  
RIGHT ("STATION", 2) = 00

enter image description here


I get invalid SQL statement.
Does anyone see what I am doing wrong?


Respectfully I did search and did not see any of the example questions you presented. However it still does not answer my question, re-stated, what am I doing wrong?



Answer



Use the MOD function, which returns the remainder after division:



MOD("STATION",100) = 0

Here's an example, in which I've selected all the records having an ADMINID which is a multiple of 10:


enter image description here


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...