3

I want to select batches of features using an expression which gives a range of IDs to select.

Instead of writing this "ID" IN (1,2,3,4,5) I would like to write something like this "ID" IN (1:5)

I tried the following but they didn't work:

"ID" IN (generate_series(1,5,1))

"ID" IN (array_to_string(generate_series(1,5,1)))

5

How about this ?

array_find(generate_series(1,5),"ID")>0
|improve this answer|||||
  • This is close! Thank you. I was hoping that there was an operator like ' : ' that I just didn't know about but this is good too! – TeddyTedTed Feb 19 at 14:35
3

How about this?

"ID" <= 5 AND  "ID" >= 1
|improve this answer|||||
  • 1
    I must be having a pretty slow day because I didn't think of this. It's not exactly what I'm looking for but thank you! – TeddyTedTed Feb 19 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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