An expression is the part of a query that specifies its
conditions. A query evaluates data and returns only the
subset of data that meets the query’s conditions.
For example, an expression might specify all parcels on
a particular street whose area is larger than 4000 square
feet. Only parcels that meet those criteria are displayed
or selected by a query containing this expression.
A complete query also specifies the set of data to which
the conditions are applied and the action to apply to
the data that meets the conditions. For example, you
can query a particular feature layer in a map and either
display or hide data in that layer, depending on whether
it meets the query conditions or not.
In practice, you specify the data set by selecting the
feature class or layer to query before you build the
expression. You specify the action to apply when you
select the command that lets you build the expression.
The title bar for the dialog box in which you create
expressions will be different, depending on the
command you choose. The contents of the dialog box
are much the same, no matter what it is called.
Use expressions to filter geospatial data, select a
subset of data, calculate values, or convert data from
one data type to another. Use text expressions to format
text strings for display, for example, as labels. Use
numeric expressions to apply math functions to
properties with numeric values.
Basic Steps for Creating Expressions
To create an expression, follow these basic steps:
■ Specify the data to which the expression will be
applied. For example,select the layer to filter.
■ Select a command that can use an expression.
For example, right-click a layer and select Filter To Select.
■ Use an expression to specify the conditions for the command.
For example, create an expression to specify the subset
of features on the layer to select.