Hello, I like to convert tables (100+) living in access database to a geodatabase table, sorting them and deleting unnecessary fields in each table at the same time. I figured I use the Sort_management method to convert and sort the tables followed by DeleteFieldd_management method to delete the fields. Here is the code that I have written,
I am getting the following error message,
Attachment 22543
Code:
import arcpy
from arcpy import env
env.workspace = "E:\Database Project\ACS Estimate 2011\ACS 2011 Tables.mdb"
tableList = arcpy.ListTables()
for table in tableList:
out_dataset = "E:\Database Project\ACS Estimate 2011\Data\To Database\Seq Tables.gdb"
#Process: Sort
arcpy.Sort_management(table, out_dataset, "GEOID ASCENDING", "UR")
#Process: Delete Field
arcpy.DeleteField_management(out_dataset, "FILEID;FILETYPE;STUSAB;CHARITER")
Attachment 22543