Select to view content in your preferred language

Queries - numbers work, text doesn't

530
3
06-23-2010 07:08 AM
SueCarroll
New Contributor III
I'm trying to create a query on the US Weather Warnings Service in ArcGIS Explorer Online to locate types of EVENTS (really, I'm just testing the query function).  So I click the Query Button, select the layer and construct my query:
EVENT = 'RED FLAG WARNING'

Seems pretty simple, but I get an error - Unable to perform query.  Check the syntax and try again.

I've tried single quotes, double quotes, no quotes.  And I've tried queries on different services.  If I query for a number I get results, but not if I query text.  Any ideas?

Sue
Tags (2)
0 Kudos
3 Replies
ArcGISUser
Regular Contributor
I'm trying to create a query on the US Weather Warnings Service in ArcGIS Explorer Online to locate types of EVENTS (really, I'm just testing the query function).  So I click the Query Button, select the layer and construct my query:
EVENT = 'RED FLAG WARNING'

Seems pretty simple, but I get an error - Unable to perform query.  Check the syntax and try again.

I've tried single quotes, double quotes, no quotes.  And I've tried queries on different services.  If I query for a number I get results, but not if I query text.  Any ideas?

Sue


Since you said that numbers worked, you mean that numbers for the EVENT field worked?  If so, are you using domains or subtypes?  Maybe you need to call the coded value/number rather than the description?  Like if RED FLAG WARNING was coded as a number nine, then you'd type in EVENT = 9 or even EVENT = '9' ?  I realized afterwards that this is the ArcGIS Online section... Not sure if my response would help at all.
0 Kudos
SueCarroll
New Contributor III


Since you said that numbers worked, you mean that numbers for the EVENT field worked?  If so, are you using domains or subtypes?  Maybe you need to call the coded value/number rather than the description?  Like if RED FLAG WARNING was coded as a number nine, then you'd type in EVENT = 9 or even EVENT = '9' ?  I realized afterwards that this is the ArcGIS Online section... Not sure if my response would help at all.


I tried querying other fields that were numbers and got results, but when querying string fields I get the error message.  Since I'm querying Services, I wouldn't know if there was a coded domain or not.  I'm simply building the query based on the supplied sample information under the Data tab.

Does anyone know if the Service has to be designed to ALLOW queries, like it has to be allowed for other functions?

Sue
0 Kudos
AndyMacDonald
New Contributor III
For some reason, queries based on string fields are failing for this service. According to the service description there are no coded value domains. Trying to run that query using the services directory (http://rmgsc.cr.usgs.gov/ArcGIS/rest/services/nhss_weat/MapServer/0/query) also fails.

In general, string queries work fine. For example, try the following service:

http://server.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_Daytime_Population/MapServer

with the fllowing query:

ST_ABBREV = 'ME'

Andy
0 Kudos