Remove Join (Data Management) |
|
Release 9.2
Last modified November 29, 2010 |
![]() ![]() ![]() Print all topics in : "Tools" |
Removes a join from a feature layer or table view
Usage tips
The join name is the name of the table that was joined to the input layer or table view.
When a layer is joined to two tables and the first join is removed, then both joins will be removed. For example, Layer1 is joined to TableA. Then Layer1 is joined to TableB. If the join to TableA is removed, the join to TableB is also removed.
This tool is not limited to ArcMap; it works on layers and table views in ArcCatalog and in scripts. The Make Feature Layer tool makes a layer for a feature class, and the Make Table View creates a table view from an input table or feature class.
No environment settings affect this tool.
Command line syntax
An overview of the Command Line window
RemoveJoin_management <in_layer_or_view> <join_name>
Parameter | Explanation | Data Type |
<in_layer_or_view> |
The layer or table view from which the join will be removed. |
Table View | Raster Layer |
<join_name> |
The join to be removed. |
String |
RemoveJoin roads_layer roads_lookup
Scripting syntax
About getting started with writing geoprocessing scripts
RemoveJoin_management (in_layer_or_view, join_name)
Parameter | Explanation | Data Type |
in_layer_or_view (Required) |
The layer or table view from which the join will be removed. |
Table View | Raster Layer |
join_name (Required) |
The join to be removed. |
String |
# AddFieldFromJoin.py # Description: Adds a field to a table, and calculates it's values based # on the values in a field from a joined table # Requirements: # Author: ESRI # Date: December 31 2003 # Create the Geoprocessor object import arcgisscripting gp = arcgisscripting.create() try: # Set a variable to reduce typing gp.AddField("c:/workspace/gdb.mdb/roads","surfaceType","TEXT") # Make a layer from the feature class gp.MakeFeatureLayer("c:/workspace/gdb.mdb/roads","roads_layer") # Join the road_lookup_info table to my roads_layer gp.AddJoin("roads_layer","roadId","c:/workspace/gdb.mdb/roadsLookup","roadId") # Calculate the surfaceType field gp.Calculate("roads.surface_type","roadsLookup.surfaceType") # Remove the join gp.RemoveJoin("roads_layer", "roadsLookup") except: # If an error occurred while running a tool, print the messages print gp.GetMessages(2)