Finding features with a SQL query

A SQL query can be used to select features based on a combination of attribute values. For example, if you only wanted to find rivers with fluctuating tidal conditions, you could define a SQL query to locate those features.

The Execute SQL check also allows you to run predefined WHERE clauses in a batch on your databases. All features or rows whose parameters match those defined in the SQL query are returned.

Once you have defined the criteria for the check, you can configure the notes and a severity rating. The notes allow you to provide a more specific description for the feature that has been written to the Reviewer table and are copied to the Notes field in the Reviewer table. The severity rating allows you to indicate how important the results from a check are in terms of your quality assurance/quality control processes. The lower the number, the greater the priority the check's results have.

步骤:
  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. On the main menu, click Customize > Toolbars > Data Reviewer.
  3. Click the Select Data Check drop-down arrow on the Data Reviewer toolbar, click the plus sign (+) next to Table Checks, then click Execute SQL Check.

    The Execute SQL Check Properties dialog box appears.

    Execute SQL Check Properties dialog box
  4. If necessary, type a unique name for the check in the Check Title text box.
    注意注意:

    The check title can be used to describe the conditions you are looking for with the check. This is useful when you have multiple instances of the same check to validate the same feature classes or tables but with different validation parameters.

  5. Click the Feature Class/Subtype drop-down arrow to choose the feature class and subtype on which to run the check.
  6. To run the check on the entire feature class and save this setting, check the Always Run on Full Database check box.
  7. Click SQL.

    The Select Features Using a Query dialog box appears.

    Select Features Using a Query
  8. 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.

  9. Click an operator to add it to the query.
  10. Double-click a field value in the Values list.

    The value is added to the query.

  11. Repeat steps 8–10 to add parameters to the query.
  12. 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.

  13. Click OK.

    The Execute SQL Query Check Properties dialog box appears.

  14. If necessary, type descriptive text for the check results in the Notes text box in the Reviewer Remarks area.
  15. If necessary, click the Severity drop-down arrow and choose a value that indicates the priority of the check's results in the Reviewer Remarks area.
  16. Click OK.
  17. Click the Run Data Check button Run Data Check on the Data Reviewer toolbar.

    The Features to Validate dialog box appears.

    Features to Validate dialog box
  18. Choose an option in the Features to Validate area.
    • Selection Set—The check is run on the features that are currently selected in the map.
    • Current Extent—The check is run on the current map extent, which is controlled by the map scale.
    • Definition Query—The check is run on the features that are displayed based on definition queries that have been created for the feature class.
    • Full Database—The check is run on all the features in the feature class.
  19. To run the check only on features that have been edited in a versioned workspace, check the Changed Features Only check box.
    注意注意:

    The Changed Features Only option is available only for a versioned database.

  20. Click OK.

9/23/2010