7

I want to filter out some bits of a layer and I want to do this in Query builder in the on a text field which contains names of several countries. I cannot figure the use of "IN" as in I want to find 'India' or 'China' or 'Bhutan' in field "Territory." Seems like it should be easy, but I'm just stupid today.

  • Don't worry, everyone has bad days. It doesn't make you stupid :) – Joseph Sep 28 '16 at 11:51
16

You could use something like:

"Territory" IN ('India', 'China', 'Bhutan')
  • 2
    See here about SQL IN operator: w3schools.com/sql/sql_in.asp – wiltomap Sep 22 '16 at 13:32
  • This question is not really about GIS stuff. It should rather be posted on other SE sites such as Stackoverflow or Database Administrators. – wiltomap Sep 22 '16 at 13:34
  • 1
    @wiltomap Isn't still highly relevant to GIS users? – Victor Sep 22 '16 at 14:16
  • @wiltomap that's only the case if the user is aware that QGIS query builder uses standard SQL syntax in this case – underdark Sep 22 '16 at 15:54

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.