Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a very simple question about the advanced query builder in QGIS.

I'd like to search for a range of numerical data values in the attribute table, but asking QGIS to show me values that are <= the low value and >= the high value doesn't seem to work; I continuously get a message that says:

syntax error, unexpected LE

although sometimes is says GE instead of LE.

Haven't a clue what GE and/or LE refer to and can't find it on the internet.

Here's a screenshot of the query builder and the message

This should be easy but it's not, which generally means I'm missing something.

share|improve this question

Looks like you just need to supply the field ID for both the greater than and less than operations. This should work:

CELL_ID >= 106551 AND CELL_ID <= 247977
share|improve this answer
Oh Hallelujah. Thanks Dan, that was driving me nuts. – QGIS NOOB Sep 25 '13 at 4:52
@user22299 Dan is correct. The "Unexpected LE" means the expression parser encountered a "less than or equal to" (LE or <=) when it was expecting the field name. – Luke Sep 25 '13 at 4:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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