I am trying to select house numbers that are between 200 and 499. I've been using:

"HOUSE_" >= '200' AND "HOUSE_" <= '499'

... and it's coming up with almost everything else. The numbers it does grab don't make sense at all either. I tried using a BETWEEN operator but that just gives me an error.

closed as unclear what you're asking by PolyGeo, whuber Aug 5 '14 at 0:40

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 5
    What software are you using? What database are you using? What is the datatype of the field: 'HOUSE_' ? – Devdatta Tengshe Aug 4 '14 at 16:02
  • 2
    Try to put yourself in the position of the reader, your question is incomprehensible. – Leasye Aug 4 '14 at 16:06

The number values in your example query have quotation marks around them, so it looks like the problem is that your house numbers are stored as strings and not as numbers. You can check by right-clicking the field heading and clicking Properties.

If the type is String, you'll need to create a new House Number field of the Integer type. Use the Field Calculator to populate it with the values from the existing HOUSE_ field, then try your query again on the new integer House Number field. It should work the way you expect then.

  • 3
    Or if the field is already a number field, just remove the quotation marks around the numbers ("HOUSE_" >= 200 AND "HOUSE_" <= 499 – RyanDalton Aug 4 '14 at 18:01

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