REST Services Query for distinct values

6060
2
Jump to solution
04-25-2013 03:50 AM
ShaningYu
Frequent Contributor
In SQL, it is easy to get distinct values from a table.  When open a map service on browser, how can retrieve distinct values of an attribute using a query statement?  Thanks.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
ShaningYu
Frequent Contributor
0 Kudos
2 Replies
ShaningYu
Frequent Contributor
0 Kudos
TanuHoque
Esri Regular Contributor
starting at 10.1 SP2, map service's query operation allows you to get unique values. All you need to do is set "OutFields" to that field from where you need to extract the unique value and set "returnDistinctValue" to True

http://resources.arcgis.com/en/help/rest/apiref/query.html
0 Kudos