2

I have many land parcels related to many different cities. I would like to select land parcels related to some of these cities only (about 20 of them).

Is using LIKE/ILIKE + OR like below the only way to do this or is there a faster and more elegant way to do it when dealing?

'ILIKE'-way:

"city" ILIKE 'Paris' 
or
"city" ILIKE 'Rome' 
or
"city" ILIKE 'Berlin' 
or
"city" ILIKE 'Moscow'

Maybe in the form? But just writing 'Paris' OR 'Rome' or 'Berlin' or 'Moscow' in the "city" field doesn't seem to work.

2
  • 1
    Please, inspect carefully the comments left in your previous question, mainly one from @ahmadhanb, i.e. "city" in ('Paris', 'London', 'Berlin', ...) is your faster and more elegant solution.
    – Taras
    Commented Aug 24, 2020 at 17:29
  • Thank you! I was about to say I had found "city" = 'Paris' or "city" = 'London' or... but this is even better indeed. Commented Aug 24, 2020 at 18:03

1 Answer 1

1

The best answer is to write:

"city" in ('Paris', 'London', 'Berlin'...)

Thank you to @ahmadhanb and @taras

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.