Make Table View (Data Management) |
|
Release 9.2
Last modified November 29, 2010 |
![]() ![]() ![]() Print all topics in : "Tools" |
Creates a table view from an input table or feature class. Table views are tables stored in memory and are the same as the table view created when a table is added to ArcMap.
Learn more about working with table views
Usage tips
This tool is commonly used to create a table view with a selected set of attributes or fields.
ArcCatalog does not display these table views, but they can be used as inputs to other geoprocessing tools in the current ArcGIS session. Once ArcGIS exits, the tables in memory are removed.
Table views created in ArcCatalog cannot be used in ArcMap.
If an SQL expression is used but returns nothing, the output table view will be empty.
For further details on the syntax for the Expression parameter, see Building an SQL Expression or SQL Reference.
Field names can be given a new name by using the Field Information control. The second column on the control lists the existing field names from the input. To rename a field, click the field name and type in a new one.
The field names will be validated by specifying an input workspace. Thus, if the input is a geodatabase feature class and the output workspace is a folder, the field names may be truncated, since shapefile attributes can only have names of ten characters or less. The new names may be reviewed and altered using the Field Information control.
A subset of fields can be made visible in the new layer by using the Field Information control. The third column in the control provides a dropdown option to specify whether a field will be visible or hidden in the new layer. The default is TRUE. Selecting FALSE will hide that field. If the feature layer is saved as a new feature class, only the fields listed as visible will appear in the new output.
The split policy option on the Field Information control does not apply to this tool.
An existing table view will be overwritten if the same table view name is entered.
The following environment settings affect this tool: workspace, scratch workspace, Extent, M Domain, Configuration keyword, Coordinate system, Output has M values, Output spatial grid, Output has Z values, Default Z value, Output XY domain, and Output Z domain.
Command line syntax
An overview of the Command Line window
MakeTableView_management <in_table> <out_view> {where_clause} {workspace} {field_info}
Parameter | Explanation | Data Type |
<in_table> |
The input table or feature class. |
Table View | Raster Layer |
<out_view> |
The name of the in-memory table view to be created. |
Table View | Raster Layer |
{where_clause} |
An SQL expression used to select a subset of records. The syntax for the expression differs slightly depending on the data source. For example, if you're querying file or ArcSDE geodatabases, shapefiles, coverages, dBASE or INFO tables, 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 |
{workspace} |
The workspace used to validate the field names. The field names in the table view will be formated according to the workspace type. |
Workspace |
{field_info} |
Specifies which fields from the input table to rename and make visible in the output table view. |
Field Info |
MakeTableView_management D:\Workspace\NFLD.mdb\roads 'TCH' "[ROAD_CLASS] = 'TCH'" "LEVEL ROAD_CODE VISIBLE, NAME NAME HIDDEN"
Scripting syntax
About getting started with writing geoprocessing scripts
MakeTableView_management (in_table, out_view, where_clause, workspace, field_info)
Parameter | Explanation | Data Type |
in_table (Required) |
The input table or feature class. |
Table View | Raster Layer |
out_view (Required) |
The name of the in-memory table view to be created. |
Table View | Raster Layer |
where_clause (Optional) |
An SQL expression used to select a subset of records. The syntax for the expression differs slightly depending on the data source. For example, if you're querying file or ArcSDE geodatabases, shapefiles, coverages, dBASE or INFO tables, 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 |
workspace (Optional) |
The workspace used to validate the field names. The field names in the table view will be formated according to the workspace type. |
Workspace |
field_info (Optional) |
Specifies which fields from the input table to rename and make visible in the output table view. |
Field Info |
import arcgisscripting gp = arcgisscripting.create() gp.workspace = "d:/workspace/NFLD.mdb" gp.maketableview "nf_roads", "TCH", "[ROAD_CLASS] = 'TCH'", "LEVEL ROAD_CODE VISIBLE, NAME NAME HIDDEN"