I have a map server published on ArcGIS Server and it has a Poles layer. It has following fields:

Images of poles layer attributes

Now when I am trying to run any query against this layer by passing queries like



Owner = 'Utility'

I am getting this error while I am sure the Owner is not NULL and all has value of utility

Failed to execute query.

enter image description here

Can you please let me know what I am doing wrong?

  • 1
    "return fields" always has to be set. Are you setting it? I always add * in there when doing a quick and dirty test – Dowlers Sep 10 '18 at 22:32
  • 1
    @Dowlers Return fields doesn't have to be set. If left empty, the geometry and the display field will be returned by default. – Berend Nov 1 '18 at 8:18
  • @Berend Your right, it works without * at 10.5.1. I could have sworn at 10.3.1 I always had to enter * but I don't have an installation to test on. Thanks for letting me know. – Dowlers Nov 1 '18 at 14:00
  • 1
    @Dowlers Actually that wouldn't have surprised me, but I just checked an old 10.2 installation and that works without * too. It's the where that's required, and of course, if you want to see some useful information, you need * anyway. – Berend Nov 1 '18 at 14:51

the best way to check an ArcGIS REST API endpoint is to simply add Where 1=1. In this way you should be able to get every possible result.

If you add the * on the out fields as it is mentioned in the commends you will also get all the attributes.

Finally, If you want to check for strings the

Owner = 'Utility'

should work. Check again as we discussed with all the output fields and you should be able to find the issue with this field.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.