Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Analysis toolbox > Extract toolset > Tools

Select (Analysis)

Release 9.2
Last modified January 13, 2009
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

Extracts features from an input feature class or input feature layer and stores them in a new output feature class. The output feature class may be created with a subset of features based on a Structured Query Language (SQL) expression.


Usage tips

Command line syntax
An overview of the Command Line window
Select_analysis <in_features> <out_feature_class> {where_clause}

Parameter Explanation Data Type
<in_features>

The input feature class or layer from which features are selected.

Feature Layer
<out_feature_class>

The output feature class to be created. This feature class will contain all the features from the input if no expression is specified.

Feature Class
{where_clause}

An SQL expression used to select a subset of features.

The syntax for the expression differs slightly depending on the data source. For example, if you're querying file or ArcSDE geodatabases, shapefiles, or coverages, enclose field names in double quotes:

"MY_FIELD"

If you're querying personal geodatabases, enclose fields in square brackets:

[MY_FIELD].

For more information on SQL syntax and how it differs between data sources, see SQL Reference.

SQL Expression
Data types for geoprocessing tool parameters


Command line example

select_analysis D:\Workspace\wells.shp D:\Workspace\wells_Gas.shp ("WELL_TYP" = 'GAS')

Scripting syntax
About getting started with writing geoprocessing scripts
Select_analysis (in_features, out_feature_class, where_clause)

Parameter Explanation Data Type
in_features (Required)

The input feature class or layer from which features are selected.

Feature Layer
out_feature_class (Required)

The output feature class to be created. This feature class will contain all the features from the input if no expression is specified.

Feature Class
where_clause (Optional)

An SQL expression used to select a subset of features.

The syntax for the expression differs slightly depending on the data source. For example, if you're querying file or ArcSDE geodatabases, shapefiles, or coverages, enclose field names in double quotes:

"MY_FIELD"

If you're querying personal geodatabases, enclose fields in square brackets:

[MY_FIELD].

For more information on SQL syntax and how it differs between data sources, see SQL Reference.

SQL Expression

Data types for geoprocessing tool parameters


Script example

import arcgisscripting
gp = arcgisscripting.create()
gp.workspace = "h:/workspace"

# For shapefile expression, fields are double quoted (") and text values are single quoted (')
gp.select_analysis("nfroads.shp", "paved.shp", ' "ROAD_CLASS" = \'PAVED\' ')

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.