Solved! Go to Solution.
However, it will not loop anymore
FIPSlist = ('001', '003', '005') for fip in FIPSlist: query = "FIPS_PARIS ='" + fip + "'" arcpy.TableSelect_analysis("Master_TAHI", FIPS + r"\FIPS" + fip + ".dbf",query)
for i in range(1,129,2): fipString=str(i).zfill(3) arcpy.TableToTable_conversion("Master_TAHI", "C:\\Users\\D2148\\Documents\\Maps\\Parish Roads\\TAHI_LRS\\Parish_roads\\TAHI_parish\\FIPS", "FIPS%s.dbf" % fipString, "\"FIPS PARIS\" = '%s'" % fipString)
. I am having a problem executing this file. It keeps saying there is a error. The maximum record length has been exceeded. The file only has 87000 records.
- Field names cannot be longer than 10 characters.
- The maximum record length for an attribute is 4,000 bytes. The record length is the number of bytes used to define all the fields, not the number of bytes used to store the actual values.
- The maximum number of fields is 255. A conversion to shapefile will convert the first 255 fields if this limit is exceeded.
- The dBASE file must contain at least one field. When you create a new shapefile or dBASE table, an integer ID field is created as a default.
- dBASE files do not support type blob, guid, global ID, coordinate ID, or raster field types.
- dBASE files have little SQL support aside from a WHERE clause.
- Attribute indexes are deleted when you save edits, and you must re-create them from scratch.
Arc 10 Help: Geoprocessing considerations for shapefile output
inputTable = r"C:\temp\test\mytable.dbf" outputWorkspace = r"C:\temp\test" fipsLlist = ['001', '003', '005', '007', '009', '011', '013', '015', '017', '019', '021', '023', '025', '027', '029', '031', '033', '035', '037', '039', '041', '043', '045', '047', '049', '051', '053', '055', '057', '059', '061', '063', '065', '067', '069', '071', '073', '075', '077', '079', '081', '083', '085', '087', '089', '091', '093', '095', '097', '099', '101', '103', '105', '107', '109', '111', '113', '115', '117', '119', '121', '123', '125', '127'] for fip in fipsList: arcpy.TableSelect_analysis(inputTable, outputWorkspace + "\\fips_" + str(fip) + ".dbf", ","FIPS_PARIS = " + "'" + fip + "'")
How about:inputTable = r"C:\temp\test\mytable.dbf" outputWorkspace = r"C:\temp\test" fipsLlist = ['001', '003', '005', '007', '009', '011', '013', '015', '017', '019', '021', '023', '025', '027', '029', '031', '033', '035', '037', '039', '041', '043', '045', '047', '049', '051', '053', '055', '057', '059', '061', '063', '065', '067', '069', '071', '073', '075', '077', '079', '081', '083', '085', '087', '089', '091', '093', '095', '097', '099', '101', '103', '105', '107', '109', '111', '113', '115', '117', '119', '121', '123', '125', '127'] for fip in fipsList: arcpy.TableSelect_analysis(inputTable, outputWorkspace + "\\fips_" + str(fip) + ".dbf", ","FIPS_PARIS = " + "'" + fip + "'")