AnsweredAssumed Answered

Sort_management in for loop

Question asked by Adityaraj on Mar 12, 2013
Latest reply on Mar 12, 2013 by rafaelr
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,

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")

I am getting the following error message,