Adding a table to the SQL statement
The standard ArcMap Query Builder allows you to construct a WHERE clause to filter or select the rows of a feature class or table based on attributes contained within it. With the Visual Specifications Tool's Query Builder, you can construct full SQL SELECT statements, including inner joins of multiple tables and feature classes. If needed, you can fully specify all the clauses (SELECT, FROM, WHERE, GROUP BY, and ORDER BY) that a SQL query supports.
Schritte:
-
Right-click the layer for which you want to define a calculated specification rule and click Properties.
The Layer Properties dialog box appears.
- Click the Calculated Representations or Calculated Fields tab.
- If necessary, create a new representation and rule.
-
Click the SQL Statement drop-down arrow and click Edit SQL statement.
The Query Builder dialog box appears.
-
Click Add Table.
The Add Table dialog box appears.
- Navigate to the feature class, relationship class, or table you want to add to the statement.
-
Click Add.
The Query Builder dialog box appears.
- Choose the field from the added table you want to use in the selection.
- Click Add to SELECT if you want to be able to use the field value to later define a VBScript.
- Click Add to WHERE to use the field to determine your selection set.
-
Click All Values.
All the unique values for the field appear in the Values list.
- Choose one of the values in the Values list.
- Click Add to WHERE.
- Click one of the operator buttons.
- Repeat steps 5–11 until your statement is complete.
- Click Verify to validate the SQL statement.
-
Click OK.
Tipp:
You can clear the contents of the SELECT OBJECTID and WHERE areas by clicking Clear.
9/16/2010