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.

Learn more about data checks in Data Reviewer

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.

Learn more about defining map sheet areas of interest

步骤:
  1. Start ArcMap.
    提示提示:

    If the ArcMap - Getting Started dialog box appears, you can open a new or existing map document. You can also check the Do not show this dialog box in the future check box and click Open.

  2. 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 Select Features Using SQL 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.

    Select Features Using a Query dialog box
  3. 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.

    注意注意:
    If there is a large number of possible values for a field, only a short list of them is initially shown.
  4. Click an operator to add it to the query.
  5. If necessary, click All Values to view all the unique values for the field.
  6. Double-click a field value in the Values list.

    The value is added to the query.

  7. Repeat steps 3–6 to add parameters to the query.
    注意注意:
    You can also edit the SQL statement directly in the Where Clause text box.
  8. 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.

  9. Click OK.

9/23/2010