Select to view content in your preferred language

Multipile Select In Where Clause of Query()

1277
2
Jump to solution
09-15-2016 02:29 PM
BehrouzHosseini
Regular Contributor

I have  a simple query like

query.where = "NAME = 'Renfrew'";

which works perfectly on QueryTask(). Now I would like to select array of points like

query.where = "NAME = 'Central Branch' AND NAME = 'Renfrew'";

but it is not working. Can you please let me know how to fix this? thanks

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Behrouz,

   The where string should look like:

query.where = "NAME = 'Central Branch' OR NAME = 'Renfrew'";

or

query.where = "NAME IN ('Central Branch','Renfrew')";

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Emeritus

Behrouz,

   The where string should look like:

query.where = "NAME = 'Central Branch' OR NAME = 'Renfrew'";

or

query.where = "NAME IN ('Central Branch','Renfrew')";

BehrouzHosseini
Regular Contributor

Thanks Robert

0 Kudos