Query Count Not The Same As From ArcMap

Discussion created by rcoodey on Aug 29, 2011
Latest reply on Oct 14, 2011 by ahoque-esristaff
The map I am publishing has a layer with a definition query, In ArcMap the attribute table for this layer says it has 9154 rows... but if I run a query against this same layer after publishing this same map as an MSD to ArcGIS Server 10 SP2, with the where set to "1=1", I get 12472 rows... why aren???t these counts the same?  Same map querying the same source!!!

My WPF app has a FeatureLayer that is returning this same count of 12472, which lead me to find that the REST query does the same.

Thanks a lot for any help!

A few things I have found, maybe it is something I am not understanding about ArcMap
- Querying the SQL Server SDE View directly with the same query, there are indeed 12472 records.
- If I set the symbology from single to unique values, and hit the count column, i get 12472.
- If I select all features in the layer I get 9154.
- As mentioned earlier, the attribute table is 9154.

Does this maybe have something to do with the SDE View being one to many?  I tried finding the count of duplicate joins in the view, and that makes the count close, but still not quite the same.  If this is the case, maybe I need to find out how to do one to many joins in an SDE view properly... still odd that Server is different than ArcMap though.