2

I have several shapefiles in ArcMap 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".

This person 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...?

  • You can create a blank Shapefile from any existing shapefile schema, edit the field widths in Catalog, finally Append all data into the blank shapefile. – klewis May 28 at 20:47
  • 1
    Another option would be Append, which is bit less picky than Merge. – danak May 28 at 22:30
3

Reading the answer you linked carefully you can see that you could copy the shapefile whose fields you are trying to change using the Feature Class to Feature Class tool. This tool gives you a Field Map section with a list of all your original fields and the possibility to change the length property before actually copying the input sahpefile.

So basically, you could do something like this (just pretend my "test" shapefile in the picture is the shapefile you have and "Id" is the field you need to change:

enter image description here

enter image description here

enter image description here

enter image description here

  • Oh, awesome! Thank you for pointing that out, and sorry that my reading comprehension skills are apparently not so good :) – ale19 Jun 5 at 15:53
  • 1
    no worries, never meant to say so. maybe, my writing skills are not so good ;P – umbe1987 Jun 5 at 20:49
0

The Merge Geoprocessing tool will use the length of the first layer brought into the dialog. If every other parameter (besides field length) is the same, a simple (perhaps the simplest?) way that I have found to circumvent the errors that you've described, is to put the one with the longest field length in first. This is because it is using the first layer encountered to set the length for the output. It is possible to put values smaller than some length into a field but it is not possible to put values larger than some fixed length into the output. If you have multiple lengths, you may have to experiment with discovering which is best to put first (especially when multiple other possible field collisions exist).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.