AnsweredAssumed Answered

Split table to JoinField_management problem

Question asked by JB1234510 on Mar 19, 2015
Latest reply on Mar 19, 2015 by blake.terhune
# 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):
    print i
    y = str(i + 99)
    print y
    z = str(i)
##    SelectCl = ( [ID] < ' + y + " AND [ID] > '" + z + ")
    arcpy.SelectLayerByAttribute_management(MekaLyr,"NEW_SELECTION", '( [ID] < ' + y + " AND [ID] > " + z + ")")
    
    # Process: Feld verbinden
    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")
    # Process: Features kopieren
    arcpy.CopyFeatures_management(ALK_Flurstueck_Merge1_2, "zwErgebnis_" + i, "", "0", "0", "0")

 

Unfortunately the join doesn't work in one, so I want to split the table and join then?

But I miss the option which offers the arcmap interface - keep only matching records?

With the script here python is working, but nothing happens?

Outcomes