Select to view content in your preferred language

Query builder

2957
6
Jump to solution
10-14-2014 12:42 AM
MassimoSpirlandelli
Emerging Contributor

In my "level curves" (1 meter definition) shp file  I want to query:

- the pair numbers (for instance: 102, 104, 106, 108, 110 , ect. ect.)

- every five meters (for instance: 100, 105, 110, 115, 120, 125, ect. ect.)

 

How can I do quickly instead of select every single record?

Is there any query?

 

thank you

0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Emeritus

if you have to do this with a lot of records, consider building a temporary field then you can query that field for the appropriate ranges  see the example of using the mod (%) function in python.  Unfortunately the query builder doesn't support native python at present.

ModulousExample.png

View solution in original post

6 Replies
JohannesBierer
Frequent Contributor

With python:

for i in range(102, "End", 2😞
  
print i

0 Kudos
MassimoSpirlandelli
Emerging Contributor

could you explain me clearly with details (I have never used directly python) ?

0 Kudos
JohannesBierer
Frequent Contributor

The best is to create a model with select by attribute - then export the model to python and modificate the python code with the for i in range command?

0 Kudos
MassimoSpirlandelli
Emerging Contributor

ok but with query builder it isn't possible ?

0 Kudos
DanPatterson_Retired
MVP Emeritus

if you have to do this with a lot of records, consider building a temporary field then you can query that field for the appropriate ranges  see the example of using the mod (%) function in python.  Unfortunately the query builder doesn't support native python at present.

ModulousExample.png

MassimoSpirlandelli
Emerging Contributor

THANK YOU !

easy and fast !!

0 Kudos