I am currently working on a mapping project and only need 8 tenements out of many to appear. I have gone into the query builder to complete this and unfortunately it will not work. Into the builder a put Tenement = 'E59/1002' AND Tenement = 'E59/1421'. It verifies but no records are found? I am not sure why this is happening as this method has always worked for me before when i need to select multiple tenements? Any help?

Cheers, Kat


All you need to do is change AND to OR. Because AND is a valid logical operator the validation passes. So technically the query is correct, it just will not return any records.

  • +1 Good catch, at first I thought it was correct, but he was saying that 'Tenement' had to have both values which would be hard. – D.E.Wright Oct 22 '11 at 19:52

You can also use the IN (includes). Like...
Tenement IN ('E59/1002', 'E59/1421')
Tenement NOT IN ('E60/1002', 'E60/1421')

  • Never really tried that, will that work like an 'OR'? – D.E.Wright Oct 22 '11 at 19:53
  • Yes, IN is equivalent to writing an OR statement for each member of the list. – blah238 Oct 22 '11 at 22:38
  • This is the more efficient way to write this type of query. – Jakub Sisak GeoGraphics Oct 24 '11 at 14:43
  • 1
    It should be mentioned that 'IN' works only in geodatabases (see link) – jonatr Jan 18 '12 at 14:19
  • actually I use "the_name_of" IN ('this anme', 'that name') quite often in shape files. – Brad Nesom Jan 18 '12 at 14:36

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.