Select to view content in your preferred language

Merge datasets with unequal field lengths

1167
1
05-28-2019 07:33 AM
AliceElliott
Occasional Contributor

I have several shapefiles that I want to merge together into one shapefile so I don't have to keep juggling them all.

However, I can't use the Merge geoprocessing tool because it gives me a "001156: Failed on input OID; could not write value to output field TXPYRS_NAME" error. This seems to be because each shapefile has a different length for TXPYRS_NAME. 

But when I go into ArcCatalog and try to change the field length in the Shapefile Properties window from 15 to 35 to match the other shapefiles, it says "Unable to alter field's length". 

Another GeoNet user says it's impossible to change the field length for a feature class that already contains data. So how am I supposed to merge these files if the field lengths are different and unchangeable...?

0 Kudos
1 Reply
Egge-Jan_Pollé
MVP Regular Contributor

Hi Alice Elliott‌,

Two suggestions:

  1. Did you try the Append geoprocessing tool? You could take the shapefile where the TXPYRS_NAME field has the greatest length (i.e. 35) as the Target Dataset and the other shapefiles as Input Datasets. In this way you will avoid the chance that a tax payers name will be too long for the destination field. Not sure if it will work, but you can give it a try...
  2. Workaround to increase the field length:
    • Rename the original field (form TXPYRS_NAME to e.g. TXPYRS_NAME_BCK)
    • Create a new field TXPYRS_NAME with the proper field length
    • Use Field Calculator to populate TXPYRS_NAME with value from TXPYRS_NAME_BCK
    • Drop field TXPYRS_NAME_BCK
    • et voila... your done 🙂

Hope either of these will solve your issue.

Egge-Jan