import arcpy from arcpy import env env.workspace = r"Database Connections\ORCL.sde" fc = "Roads" table = "Addresses" fcList = [] rows = arcpy.SearchCursor(fc) for row in rows: fcList.append(row.getValue("CODE")) del row, rows tableList = [] rows = arcpy.SearchCursor(table) for row in rows: tableList.append(row.getValue("CODE")) del row, rows for n in fcList: if n not in tableList: rows = arcpy.InsertCursor(table) row = rows.newRow() row.CODE = n rows.insertRow(row) try: del row, rows except NameError: pass
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.