I'm using QueryTask / Query with a StatisticsDefinition to try and get the total miles of line using the SHAPE length field, but I can't get it to work. If I remove everything but the StatisticsDefinition it works fine.
I'm testing using the REST page.
The layer I'm querying does have a join in the MXD on the published map service. So, I have to use the table prefix typically for whatever field I view.
Here's what I have for the StatisticsDefinition:
Any idea what's wrong?
I just tried:
Because of the join in the MXD, and the query is successful, but I don't see the TotalMiles field in the results on the REST page.
I checked the Server logs, and I'm seeing:
"General geodatabase error occured."
Which isn't too helpful.
I'm thinking it's because of the table join in the MXD, which is too bad because I need it.