Combining a spatial and attribute query with the Select by Location tool
There may be times when
you want to select features using a combined attribute and spatial query. For example, you might want to select all burglaries within the Edgewood school district that occurred on a Monday. This can be accomplished by running the Select by Location and Select by Attributes tools sequentially and applying a SUBSET SELECTION
selection type.
Getting ready
This recipe will require that you create a feature layer that will serve as a temporary layer, which will be used with the Select by Location and Select Layer by Attributes tools. The Select by Location tool will find all burglaries that are within the Edgewood School District and apply a selection set to those features. The Select Layer by Attributes tool uses the same temporary feature layer and applies a where
clause that finds all burglaries that occurred on Monday. In addition, the tool also specifies that the selection should be a subset...