How to Query for Distinct Values?

804
1
09-13-2012 01:07 PM
MikeRobinson1
New Contributor
I have a mapservice published to ArcGIS Server 10.1. On the

myserver:6080/arcgis/rest/services/..../MapServer

I would like to specify a Query where I can get all the unique values for a specific field (i.e. "myfield")

An example of the values "myfield" contains is:
A
A
B
B
C
C
D
D

What I want the query to return is:
A
B
C
D

What parameters should I specify to get DISTINCT values? I tried sticking DISTINCT in the "Where:" box, but it did not work.
Tags (2)
0 Kudos
1 Reply
TanuHoque
Esri Regular Contributor
it should be supported in 10.1 SP1 only for layer/table whose supportsAdvancedQueries property returns true.
0 Kudos