<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error to join multiple table in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/error-to-join-multiple-table/m-p/1267907#M66645</link>
    <description>&lt;P&gt;line numbers would help&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-blog/code-formatting-the-community-version/ba-p/1007633" target="_blank"&gt;Code formatting ... the Community Version - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The error is explicit&lt;/P&gt;&lt;P&gt;ERROR 001706: Cannot join a table to itself.&lt;/P&gt;&lt;P&gt;Throw in some print statements to see what tables you are trying to join together&lt;/P&gt;</description>
    <pubDate>Wed, 15 Mar 2023 08:38:56 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2023-03-15T08:38:56Z</dc:date>
    <item>
      <title>Error to join multiple table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-to-join-multiple-table/m-p/1267887#M66642</link>
      <description>&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;# Set the workspace&lt;BR /&gt;arcpy.env.workspace = r"X:\Layerstack"&lt;/P&gt;&lt;P&gt;# Set the input and join tables&lt;BR /&gt;target_table = "Layer_1_tab.dbf"&lt;BR /&gt;join_tables = ["Layer_1_tab.dbf", "Layer_2_tab.dbf", "Layer_3_tab.dbf"]&lt;/P&gt;&lt;P&gt;# Set the fields to join on&lt;BR /&gt;target_field = "key"&lt;BR /&gt;join_field = "key"&lt;/P&gt;&lt;P&gt;# Join the tables to the target table using a loop&lt;BR /&gt;for table in join_tables:&lt;BR /&gt;join_field_table = arcpy.ListFields(table, join_field)&lt;BR /&gt;join_field_table_type = join_field_table[0].type&lt;BR /&gt;join_field_target = arcpy.ListFields(target_table, target_field)[0].type&lt;BR /&gt;if join_field_table_type != join_field_target:&lt;BR /&gt;arcpy.AlterField_management(table, join_field, target_field, target_field)&lt;BR /&gt;arcpy.JoinField_management(target_table, target_field, table, target_field)&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;string&amp;gt;", line 21, in &amp;lt;module&amp;gt;&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 9027, in JoinField&lt;BR /&gt;raise e&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 9024, in JoinField&lt;BR /&gt;retval = convertArcObjectToPythonObject(gp.JoinField_management(*gp_fixargs((in_data, in_field, join_table, join_field, fields, fm_option, field_mapping), True)))&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in &amp;lt;lambda&amp;gt;&lt;BR /&gt;return lambda *args: val(*gp_fixargs(args, True))&lt;BR /&gt;arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 001706: Cannot join a table to itself.&lt;BR /&gt;Failed to execute (JoinField).&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 05:22:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-to-join-multiple-table/m-p/1267887#M66642</guid>
      <dc:creator>ashwaniparashar</dc:creator>
      <dc:date>2023-03-15T05:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Error to join multiple table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-to-join-multiple-table/m-p/1267907#M66645</link>
      <description>&lt;P&gt;line numbers would help&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-blog/code-formatting-the-community-version/ba-p/1007633" target="_blank"&gt;Code formatting ... the Community Version - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The error is explicit&lt;/P&gt;&lt;P&gt;ERROR 001706: Cannot join a table to itself.&lt;/P&gt;&lt;P&gt;Throw in some print statements to see what tables you are trying to join together&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 08:38:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-to-join-multiple-table/m-p/1267907#M66645</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2023-03-15T08:38:56Z</dc:date>
    </item>
  </channel>
</rss>

