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
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.