Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

This question already has an answer here:

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 cant 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.

share|improve this question

marked as duplicate by whuber May 30 '13 at 17:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Is your field text or numeric? –  artwork21 May 30 '13 at 17:28
    
This question has been answered several times (for various versions of software): searching our site should turn up many of those answers. –  whuber May 30 '13 at 17:33
    
my field is numeric –  Brad Nesom May 30 '13 at 18:52
    
Here's another solution: gis.stackexchange.com/questions/54887/…. Now that you know 'MOD' is involved, why not search on MOD SQL? –  whuber May 30 '13 at 19:29
    
Thanks Whuber. I still can't figure out why my like statement doesn't work. –  Brad Nesom May 30 '13 at 19:56

1 Answer 1

up vote 3 down vote accepted

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

share|improve this answer
1  
This only works if your field is numeric. –  andytilia May 30 '13 at 17:32
1  
You can use CAST("my_text_field_that_has_numbers" AS NUMERIC) to convert it. –  DPierce Aug 30 '13 at 18:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.