Sign up ×

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

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


