Select to view content in your preferred language

Multipile Select In Where Clause of Query()

1217
2
Jump to solution
09-15-2016 02:29 PM
BehrouzHosseini
Occasional 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
Occasional Contributor

Thanks Robert

0 Kudos