Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- arcpy.TableToTable_conversion("FINAL_NLPG", myTempWorkspace,outputTable)
- for file in list_files:
- if file.startswith("Type_15"):
- arcpy.CopyRows_management(myDataSource + os.sep + file, r"in_memoryt15") #Row created to get a OID in table
- arcpy.MakeTableView_management(r"in_memoryt15","T15_view")
- if file.startswith("Type_21"):
- arcpy.CopyRows_management(myDataSource + os.sep + file, r"in_memoryt21")#Row created to get a OID in table
- arcpy.MakeTableView_management(r"in_memoryt21","T21_view")
- if file.startswith("Type_24"):
- arcpy.CopyRows_management(myDataSource + os.sep + file, r"in_memoryt24")#Row created to get a OID in table
- arcpy.MakeTableView_management(r"in_memoryt24","T24_view")
- #Join Table 15 with Table 24 based on USRN
- arcpy.AddJoin_management("T24_view", "USRN", "T15_view", "USRN", "KEEP_COMMON")
- #Join Table 21 with Table 24 based on UPRN
- arcpy.AddJoin_management("T24_view", "t24.UPRN", "T21_view", "UPRN", "KEEP_COMMON")
- arcpy.MakeTableView_management("T24_view","FINAL_NLPG","OBJECTID < 1000","") ## <1000 to see if the code works
- arcpy.TableToTable_conversion("FINAL_NLPG", myTempWorkspace,outputTable) # FAILS HERE
- arcpy.TableToTable_conversion("FINAL_NLPG", "in_memory",outputTable) #saving to in_memory --- SAME PROBLEM
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement