0

I have to take many values from a table, which are written differently. Usually, I use ILIKE operator, but in my case, I think that it will take more time. Unfortunately, Redshift doesn't support LIKE IN operator. I will be very happy if somebody can give me a hint on solving this.

1 Answers1

3

Redshift supports regular expressions. So, if you wanted to look for "car", "train", or "boat" in a string, you can use:

where col ~ 'car|train|boat'

This would be equivalent to:

where col like '%car%' or
      col like '%train%' or
      col like '%boat%'
Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786