Copy Rows (Data Management) |
|
Release 9.2
Last modified November 29, 2010 |
![]() ![]() ![]() Print all topics in : "Tools" |
Writes the rows from an input table, table view, feature class or feature layer to a new table.
Usage tips
If the input rows are from a feature class or table, then all rows will be used. If the input rows are from a layer or table view which has a selection, only the selected features or rows will be used.
If the input rows are a feature class, then only the attributes, and not the geometry, will be copied to the output table.
If the output table already exists, it will be overwritten. To control the overwrite behavior in an application see the Tools/Options/Geoprocessing options, in a script see the OverwriteOutput property on the geoprocessor object. To add or append the rows to an existing table (without overwritting it) use the Append tool instead.
The output table can be saved in a dBASE, ArcSDE geodatabase, file geodatabase, or personal geodatabase format.
The following environments affect this tool: configKeyword, extent, scratchWorkspace, and workspace.
Command line syntax
An overview of the Command Line window
CopyRows_management <in_rows> <out_table> {config_keyword}
Parameter | Explanation | Data Type |
<in_rows> |
The rows from a feature class, layer, table, or table view to be copied. |
Table View | Raster Layer |
<out_table> |
The table to which the rows will be written. If this table already exists it may be overwritten based on the Overwrite output setting. To control the overwrite behavior in an application see the Tools/Options/Geoprocessing options, in a script see the OverwriteOutput property on the geoprocessor object. |
Table |
{config_keyword} |
The config keyword specifies the default storage parameters (configuration) for geodatabases in a relational database management system (RDBMS). This setting is applicable only when using ArcSDE. |
String |
copyrows_management c:\base_data\water.mdb\hydro_stats c:\temp\hydro_stats.dbf
Scripting syntax
About getting started with writing geoprocessing scripts
CopyRows_management (in_rows, out_table, config_keyword)
Parameter | Explanation | Data Type |
in_rows (Required) |
The rows from a feature class, layer, table, or table view to be copied. |
Table View | Raster Layer |
out_table (Required) |
The table to which the rows will be written. If this table already exists it may be overwritten based on the Overwrite output setting. To control the overwrite behavior in an application see the Tools/Options/Geoprocessing options, in a script see the OverwriteOutput property on the geoprocessor object. |
Table |
config_keyword (Optional) |
The config keyword specifies the default storage parameters (configuration) for geodatabases in a relational database management system (RDBMS). This setting is applicable only when using ArcSDE. |
String |
import arcgisscripting gp = arcgisscripting.create() gp.workspace = "c:/states/utah.mdb" gp.toolbox = "management" # Create a table view that is a subset of the input query = '[CITY] = "Salt Lake City"' gp.maketableview("address", "salt_lake_view", query) # Copy the table view to a new table gp.copyrows("salt_lake_view", "salt_lake_addresses")