<?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 Split table to JoinField_management problem in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/split-table-to-joinfield-management-problem/m-p/70921#M5798</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Import arcpy module
import arcpy
arcpy.env.workspace = "R:\Karto\Bierer2014\FFH_MEKA\data.gdb"
# Local variables:
ALK_Flurstueck_Merge1 = r"R:\Daten\geo_daten\Basisgeometrien\Basisgeometrien_2014_03_21.gdb\data\ALK_Flurstueck_Merge1"
Meka = "R:\\Karto\\Bierer2014\\FFH_MEKA\\Meka.mdb\\Meka"
ALK_Flurstueck_Merge1_2 = "ALK_Flurstueck_Merge1"
Count_Lines = arcpy.GetCount_management(Meka)
print Count_Lines
MekaLyr = arcpy.MakeTableView_management(Meka) 
for i in range(0, 18000, 100):
&amp;nbsp;&amp;nbsp;&amp;nbsp; print i
&amp;nbsp;&amp;nbsp;&amp;nbsp; y = str(i + 99)
&amp;nbsp;&amp;nbsp;&amp;nbsp; print y
&amp;nbsp;&amp;nbsp;&amp;nbsp; z = str(i)
##&amp;nbsp;&amp;nbsp;&amp;nbsp; SelectCl = ( [ID] &amp;lt; ' + y + " AND [ID] &amp;gt; '" + z + ")
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByAttribute_management(MekaLyr,"NEW_SELECTION", '( [ID] &amp;lt; ' + y + " AND [ID] &amp;gt; " + z + ")")
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Feld verbinden
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.JoinField_management(ALK_Flurstueck_Merge1, "FLSKZ", MekaLyr, "FLRSTKZ", "FLRSTKZ;ALLB-Nr;Antragsteller;'Name, Vorname Antragsteller';Strasse;PLZ;Ort;'Nutzungsfl ar';N-Code;Meka-Codes;Feld11;Feld12;Feld13;Feld14;Feld15;Feld16;Feld17;Feld18;Feld19")
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Features kopieren
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management(ALK_Flurstueck_Merge1_2, "zwErgebnis_" + i, "", "0", "0", "0")&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately the join doesn't work in one, so I want to split the table and join then?&lt;/P&gt;&lt;P&gt;But I miss the option which offers the arcmap interface - keep only matching records?&lt;/P&gt;&lt;P&gt;With the script here python is working, but nothing happens?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 22:43:42 GMT</pubDate>
    <dc:creator>JohannesBierer</dc:creator>
    <dc:date>2021-12-10T22:43:42Z</dc:date>
    <item>
      <title>Split table to JoinField_management problem</title>
      <link>https://community.esri.com/t5/python-questions/split-table-to-joinfield-management-problem/m-p/70921#M5798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Import arcpy module
import arcpy
arcpy.env.workspace = "R:\Karto\Bierer2014\FFH_MEKA\data.gdb"
# Local variables:
ALK_Flurstueck_Merge1 = r"R:\Daten\geo_daten\Basisgeometrien\Basisgeometrien_2014_03_21.gdb\data\ALK_Flurstueck_Merge1"
Meka = "R:\\Karto\\Bierer2014\\FFH_MEKA\\Meka.mdb\\Meka"
ALK_Flurstueck_Merge1_2 = "ALK_Flurstueck_Merge1"
Count_Lines = arcpy.GetCount_management(Meka)
print Count_Lines
MekaLyr = arcpy.MakeTableView_management(Meka) 
for i in range(0, 18000, 100):
&amp;nbsp;&amp;nbsp;&amp;nbsp; print i
&amp;nbsp;&amp;nbsp;&amp;nbsp; y = str(i + 99)
&amp;nbsp;&amp;nbsp;&amp;nbsp; print y
&amp;nbsp;&amp;nbsp;&amp;nbsp; z = str(i)
##&amp;nbsp;&amp;nbsp;&amp;nbsp; SelectCl = ( [ID] &amp;lt; ' + y + " AND [ID] &amp;gt; '" + z + ")
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByAttribute_management(MekaLyr,"NEW_SELECTION", '( [ID] &amp;lt; ' + y + " AND [ID] &amp;gt; " + z + ")")
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Feld verbinden
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.JoinField_management(ALK_Flurstueck_Merge1, "FLSKZ", MekaLyr, "FLRSTKZ", "FLRSTKZ;ALLB-Nr;Antragsteller;'Name, Vorname Antragsteller';Strasse;PLZ;Ort;'Nutzungsfl ar';N-Code;Meka-Codes;Feld11;Feld12;Feld13;Feld14;Feld15;Feld16;Feld17;Feld18;Feld19")
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Features kopieren
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management(ALK_Flurstueck_Merge1_2, "zwErgebnis_" + i, "", "0", "0", "0")&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately the join doesn't work in one, so I want to split the table and join then?&lt;/P&gt;&lt;P&gt;But I miss the option which offers the arcmap interface - keep only matching records?&lt;/P&gt;&lt;P&gt;With the script here python is working, but nothing happens?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:43:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/split-table-to-joinfield-management-problem/m-p/70921#M5798</guid>
      <dc:creator>JohannesBierer</dc:creator>
      <dc:date>2021-12-10T22:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Split table to JoinField_management problem</title>
      <link>https://community.esri.com/t5/python-questions/split-table-to-joinfield-management-problem/m-p/70922#M5799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I haven't tried using table join with a selection, but my guess would be that you need to create your table view from the selection instead of creating a selection from the table view. To make it easier, you could just use a where clause when creating the table view; then do the join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, the way you call the joined table in CopyFeatures might be wrong. Try this instead:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.CopyFeatures_management(ALK_Flurstueck_Merge1, "zwErgebnis_" + i, "", "0", "0", "0")&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT:&lt;/P&gt;&lt;P&gt;Maybe try this and see what it does. I got rid of the fields you had listed in the join so it will bring back everything from Meka; not sure if that's what you want. I also got rid of the optional parameters on copy features. Did you intend to use the spatial grid parameters?&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Import arcpy module
import arcpy
arcpy.env.workspace = r"R:\Karto\Bierer2014\FFH_MEKA\data.gdb"
# Local variables:
ALK_Flurstueck_Merge1 = r"R:\Daten\geo_daten\Basisgeometrien\Basisgeometrien_2014_03_21.gdb\data\ALK_Flurstueck_Merge1"
Meka = r"R:\Karto\Bierer2014\FFH_MEKA\Meka.mdb\Meka"
Count_Lines = arcpy.GetCount_management(Meka)
print Count_Lines
for i in range(0, 18000, 100):
&amp;nbsp;&amp;nbsp;&amp;nbsp; print i
&amp;nbsp;&amp;nbsp;&amp;nbsp; y = i + 99
&amp;nbsp;&amp;nbsp;&amp;nbsp; print y
&amp;nbsp;&amp;nbsp;&amp;nbsp; z = i
&amp;nbsp;&amp;nbsp;&amp;nbsp; where_clause = "[ID] &amp;lt; {} AND [ID] &amp;gt; {}".format(y, z)
&amp;nbsp;&amp;nbsp;&amp;nbsp; MekaLyr = arcpy.MakeTableView_management(Meka, where_clause)
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Feld verbinden
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.JoinField_management(ALK_Flurstueck_Merge1, "FLSKZ", MekaLyr, "FLRSTKZ")
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Features kopieren
&amp;nbsp;&amp;nbsp;&amp;nbsp; zwErgebnis = "zwErgebnis_{}".format(i)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management(ALK_Flurstueck_Merge1, zwErgebnis)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:43:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/split-table-to-joinfield-management-problem/m-p/70922#M5799</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2021-12-10T22:43:44Z</dc:date>
    </item>
  </channel>
</rss>

