Append Table to End of Table

423
16
10-27-2017 06:54 AM
Highlighted
MVP Regular Contributor

Is there a geoprocessing tool that literally appends one table (or columns) to the end of another?  ESRI does something similar in their 'Symmetrical Difference' tool.  See below for an example. 

I know I could do this with a Python for loop and the 'Add Field' function, but that seems costly.  I was hoping there was a geoprocessing tool that could do it for me.  

Thanks for any help!

16 Replies
Highlighted
Regular Contributor II

There is the Append tool in the Data Management toolbox.

Jeff Ward
Summit County, Utah
Highlighted
Regular Contributor II

Whoops, just saw you wanted to append columns not records.

Jeff Ward
Summit County, Utah
Reply
0 Kudos
Highlighted
Regular Contributor II

How about the Add Fields tool, it allows you to add several fields with the same tool. Or you can join the one table to the original if you have a common field.

Jeff Ward
Summit County, Utah
Reply
0 Kudos
Highlighted
MVP Regular Contributor

Thanks for the reply, Jeff.  I could Add Fields, but I already have data formatted and indexed in a table.  So, ideally I would just add the entire table/data/columns to an existing table.  I can't do a join because the two datasets are not related in any way. 

Reply
0 Kudos
Highlighted
Regular Contributor II

Are they identical spatially? Could you do a spatial join?

Jeff Ward
Summit County, Utah
Reply
0 Kudos
Highlighted
MVP Regular Contributor

No, these two datasets are tables actually and do not have a spatial reference. 

Reply
0 Kudos
Highlighted
Regular Contributor II

Or is the new table empty? If so, you could just join them using a field of a common type (text, integer, float) and that would give you the empty columns tacked on at the end of the original columns then export that joined layer to another feature class.

Jeff Ward
Summit County, Utah
Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

I am a bit confused.  If the two datasets are not related in any way, how will you know you are successfully adding the data in the new columns to the data in the original columns?  The screenshot you share has all NULLs for the right-hand columns, are you just wanting to add columns or add columns that already have data.  If the latter, it gets back to my original question unless randomly mixing data between two data sets is OK.

Highlighted
MVP Regular Contributor

I'm trying to accomplish what the Symmetrical Difference tool outputs, which is two tables merged to one.  The left hand side of the table contains attributes from Table A and the right hand columns are Null or 0.  Where there is no attributes to have for Table A, the right hand side of the table contains attributes from Table B while the left hand side of the table will be Null or 0. 

I hope that's not too confusing.

Reply
0 Kudos