AnsweredAssumed Answered

Iterate tables through Python

Question asked by merebears on Jun 15, 2015
Latest reply on Jun 15, 2015 by merebears

I have a script listed below:

 

tables = arcpy.ListTables("res*")

for table in tables:

    res_500yrsumm = os.path.join(output_workspace, str("res_500yrsumm"))

    res_summ = os.path.join(output_workspace, str("res_summ"))

    arcpy.CopyRows_management(res_500yrsumm, res_summ)

    arcpy.DeleteRows_management(res_summ)

    arcpy.Append_management(table, res_summ, "NO_TEST", "", "")

 

There are seven tables it is suppose to iterate through and append to res_summ but for some reason it only does one table and stops.  I appended all of the tables separately in ArcMap using the append tool to make sure there were no issues with fields matching and it worked fine.  Is there an error in my script I'm not seeing?  Any help would be greatly appreciated.

Outcomes