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.

1 Answer 1


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
  • Oh Hallelujah. Thanks Dan, that was driving me nuts.
    Commented Sep 25, 2013 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.
    – user2856
    Commented Sep 25, 2013 at 4:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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