I need to merge two dbf tables

3312
3
04-18-2014 09:11 AM
KellyWirtz
New Contributor
Is there a tool in Arc that will merge two dbf tables?  I can also use Python code (I just don't know how to write it from scratch).

I have two tables in 2 different directories that have the same name and I want to Merge them together.  I usually have a bunch files like this so I need a better way than doing it by hand.

Thank you
0 Kudos
3 Replies
RichardFairhurst
MVP Honored Contributor
Is there a tool in Arc that will merge two dbf tables?  I can also use Python code (I just don't know how to write it from scratch).

I have two tables in 2 different directories that have the same name and I want to Merge them together.  I usually have a bunch files like this so I need a better way than doing it by hand.

Thank you


Use the Merge tool if you are outputting to an entirely new dataset.  Use the Append tool if you are copying records from one dataset into another existing dataset.  Both can take a set of inputs from multiple location to combine together.  If they are features, they have to be of the exact same feature type.  The schemas do not have to be exactly the same, but you need to use the No Test option with the Append tool and field map any unmatched fields otherwise the attributes will not transfer using that tool.  The Merge tool is probably better for this situation since it will design a new schema on the fly that retains all of the input attributes.
0 Kudos
George_Thompson
Esri Frequent Contributor
Hi Kelly,

You can use the append geoprocessing tool to combine the tables to a single output table. This may be helpful. I would only recommend running this inside of a model and not in Python, because of the field matching.

I tested loading a table in an enterprise geodatabase from tables in two different locations on my PC using the append tool with no issues.

http://resources.arcgis.com/en/help/main/10.2/#/Append/001700000050000000/    

Hope this helps! I just made it after Richards post.....

George T.
--- George T.
0 Kudos
KellyWirtz
New Contributor
Thank you both, I will try this and see if it works in our case.  :)
0 Kudos