cancel
Showing results for 
Search instead for 
Did you mean: 

Query on person regions

0 Kudos
342

Hello,

how can I create a query on person.region as it is an array.

select re from Person re where re.regions[0] = '7E3B7AB6693647BF8A3C574B34091836' is not working

Best regards

Guido

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Raphael, it works.

Thank you

Guido

Answers (1)

Answers (1)

r_barabas
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Guido

Try this:

select re from Person re where '7E3B7AB6693647BF8A3C574B34091836' in re.regions;

Note that this operator can be comparably slow when used in complex queries with a lot of data. So whenever you plan to use it, please make sure to test it on your production data.

Best regards

Raphael Barabas