Defining a SQL query in Production Mapping
Structured Query Language (SQL) queries allow you to select features by using feature attributes. When you choose the feature attributes you want to use in the query, you can then specify a range of values to use to define a selection set for a tool. In Production Mapping, SQL queries can be used with both Data Reviewer or MPS-Atlas to define a set of features to use with a particular tool. With Data Reviewer, you can use a SQL query to create a subset of features from a feature class on which you want to run a check. For example, if you want to only run a check on roads that are classified as major highways, you could define a query that selects only those features for the check.
With MPS-Atlas, SQL queries can be used to define which features should be used to create map sheets as well as with some of the dynamic text elements. In defining which features to use as areas of interest for map sheets in a map series, you could decide that you only want to include certain polygon features from a feature class. For example, you could create a query that only includes urban areas with populations greater than 250,000. With dynamic text, you can create queries to indicate which field values you want to add to your map sheet layout.
- Start ArcMap.
Open the Select Features Using a Query dialog box by doing one of the following:
To configure a Reviewer check
Click SQL on the check properties dialog box.
To create a definition query for the Reviewer table
Click SQL Builder on the Reviewer Table Definition Query tab on the Reviewer Table Properties dialog box.
To select the area of interest for a map series
Click the SQL button on the Select Features dialog box
To add a feature class attribute as dynamic text
Click Query Builder on the Feature Class Dynamic Text Properties dialog box.
To add table attributes as dynamic text
Click Query Builder on the Table Dynamic Text Properties dialog box.
The Select Features Using a Query dialog box appears.
Double-click the field to use with the query in the Fields list.
The field name appears in the Where Clause text box, and the possible values for the field are shown in the Values list.Note:If there is a large number of possible values for a field, only a short list of them is initially shown.
- Click an operator to add it to the query.
- If necessary, click All Values to view all the unique values for the field.
Double-click a field value in the Values list.
The value is added to the query.
Repeat steps 3–6 to add parameters to the query.
Note:You can also edit the SQL statement directly in the Where Clause text box.
Click Verify to verify that the query is valid.
A message appears that indicates the number of records that have been returned by the query.
- Click OK.