ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Defining an SQL query in ArcGIS Production Mapping

Available with Production Mapping license.

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 ArcGIS Production Mapping, SQL queries can be used with ArcGIS Data Reviewer Desktop to define a set of features to use with a particular tool. With Data Reviewer, you can use an 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 run a check only on roads that are classified as major highways, you could define a query that selects only those features for the check.

For more information about data checks in Data Reviewer, see Checks in Data Reviewer.

You can also use this tool to select features from the first layer listed in the table of contents.

  1. Start ArcMap.
  2. Add the Select Features Using SQL tool by doing the following:
    1. On the main menu, click Customize > Customize Mode.

      The Customize dialog box appears.

    2. Click the Commands tab.
    3. In the Categories list, choose Production Control Commands.
    4. From the Commands list, drag the Select Features Using SQL button Select Features Using SQL to a toolbar.
    5. Click Close.
  3. Click the Select Features Using SQL button Select Features Using SQL.

    The Select Features Using a Query dialog box appears.

    Tip:

    You can also open this dialog box by clicking SQL on the check properties dialog box or by clicking SQL Builder on the Reviewer Table Properties dialog box.

    Select Features Using a Query dialog box
  4. 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.
  5. Click an operator to add it to the query.
  6. If necessary, click All Values to view all the unique values for the field.
  7. Double-click a field value in the Values list.

    The value is added to the query.

  8. Repeat steps 4 through 7 to add parameters to the query.

    Note:
    You can also edit the SQL statement directly in the Where Clause text box.

  9. Click Verify to verify that the query is valid.

    A message appears that indicates the number of records returned by the query.

  10. Click OK.

Related topics

  • Finding features with a SQL query

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal