QUERY | Examples |
<QUERY | Attribute
Description Table |
When using ArcMap Server: where ="string" featurelimit ="integer" [All that meet criteria] subfields ="#ALL# | #ID# | #SHAPE# | Other fields in database" [#ALL#] When using Image, Extract, Query, or Feature Server: where ="string" accuracy ="Distance between points" [0] featurelimit ="integer" [All that meet criteria] joinexpression ="string" jointables ="string" subfields ="#ALL# | #ID# | #SHAPE# | Other fields in database" [#ALL#] > When parent element is GET_FEATURES: <BUFFER... /> <FEATURECOORDSYS... /> When parent element is LAYER and LAYERDEF in GET_IMAGE: <BUFFER... /> </QUERY > | |
Bold: Attribute or child element is
required. |
YYYY | Year | Required | Use four digits for the year. |
MM | Month (01-12) | Required | Use two digits for the month. March is 03. |
DD | Day (01-31) | Required | Use two digits for the day. The fourth is 04. |
hh | Hour (00-23) | Optional | Use a 24-hour clock. 8 a.m. is 08, and 8 p.m. is 20. |
mi | Minutes (00-59) | Optional | Use two digits for the minutes. If minutes is used, hours must also be included. |
ss | Seconds (00-59) | Optional | Use two digits for the seconds. If seconds is used, hours and minutes must also be included. |
Attribute | Usage | Back to Top |
---|---|---|
accuracy | 1 Within a feature, generalizes points based on the distance specified and the resolution of the image. | |
featurelimit | 2 Maximum number of features to be extracted that meet criteria. | |
joinexpression | 3 Used for join tables with DBF files
only; jointables must be filled to contain list of tables used; not
required when a jointable is done on ArcSDE. String must form expression: "To=[master table column which will be used for joining], From=[defines a join table column which will be joined], Type=[exact or scan]". | |
jointables | 4 List of joined table names separated by blank spaces; for ArcSDE, table name is full name including database name (e.g., DATA.STATE); for shapefiles, names of DBF files without extension (e.g., STATES). | |
subfields | 5 List of fields to be extracted separated by blank space. In stored queries, all fields in the layer table must be included. | |
where | 6 Defines where part of SQL expression. Required when jointables attribute for ArcSDE tables is used. |
Example 1: When in a map configuration file using a STOREDQUERY. For additional examples on querying datasets in map configuration files and requests, see SPATIALQUERY. | Back to Top |
<?xml version="1.0"
encoding="UTF-8"?> <ARCXML version="1.1"> <CONFIG> <ENVIRONMENT> <LOCALE country="US" language="en" variant="" /> <UIFONT color="0,0,0" name="Arial" size="12" style="regular" /> <SCREEN dpi="96" /> </ENVIRONMENT> <MAP> <PROPERTIES> <ENVELOPE minx="-178.21" miny="18.92" maxx="-66.96" maxy="71.41" name="Initial_Extent" /> <MAPUNITS units="decimal_degrees" /> </PROPERTIES> <WORKSPACES> <SHAPEWORKSPACE name="shp_ws-0" directory="<path to USA ESRIDATA>"/> </WORKSPACES> <LAYER type="featureclass" name="CITIES" visible="true" id="2"> <DATASET name="CITIES" type="point" workspace="shp_ws-0" /> <SIMPLERENDERER> <SIMPLEMARKERSYMBOL type="square" width="5" /> </SIMPLERENDERER> <EXTENSION type="StoredQuery"> <STOREDQUERIES> <STOREDQUERY name="TestSt"> <QUERY where=" ZIPL = '[%var%]' " subfields="#SHAPE# FNODE_ TNODE_ LPOLY_ RPOLY_ LENGTH RECNUM L_F_ADD L_T_ADD R_F_ADD R_T_ADD PREFIX NAME TYPE SUFFIX CFCC ZIPL ZIPR"/> <SQVAR position="0" name="[%var%]"> <FIELD name="ZIPL" precision="0" type="12" size="5" /> </SQVAR> </STOREDQUERY> </STOREDQUERIES> </EXTENSION> </LAYER> </MAP> </CONFIG> </ARCXML> |