Select to view content in your preferred language

Batch delete multiple fields

5532
8
08-30-2011 10:58 AM
AllisonSt__Vincent
New Contributor
Hello,

I am trying to delete multiple fields from many attribute tables.

I right-click on delete fields in ArcToolbox and choose batch. Then I select one layer and choose the appropriate fields to delete from the layers. If I run the tool at this point (a single shapefile), it works properly.

However, if I list two shapefiles and select the fields to delete, the tool only works on the first file. On the second file, it deletes the first header, shifts the second header to the first column and then throws an error 999999: General function failure.

Has anyone else had this problem?
Tags (2)
0 Kudos
8 Replies
GraemeBrowning
Frequent Contributor
This may or may not be the same problem, and at the moment I don't have a solution, but the output below from an ArcGIS Desktop 10.0 SP5 model indicates the same error from multiple Delete Fields (but not using batch grid).

Dropping RE from D:\graeme\Results_DEU.gdb\criteria_b1_FINAL...
Dropping RE1 from D:\graeme\Results_DEU.gdb\criteria_b1_FINAL...
Dropping RE2 from D:\graeme\Results_DEU.gdb\criteria_b1_FINAL...
ERROR 999999: Error executing function.
General function failure [criteria_b1_FINAL]
Failed to execute (Delete Field (17)).
0 Kudos
JasonRichardson
Deactivated User
I continue to get the same error, with the bonus that when I run this on a layer file in 10.2 it also seems to corrupt the entire file.  Has anybody seen a solution/resolution/reason?

Thanks!

Jason
GraemeBrowning
Frequent Contributor
If you are seeing this with 4Gb RAM and you have the opportunity to try and do it with 12Gb of RAM then you may find that to be the solution.
0 Kudos
MelanieRosenberg2
Frequent Contributor

5 years later and still having the same problem, no solution listed.

XanderBakker
Esri Esteemed Contributor

Just did a test on ArcGIS 10.3 with 3 featureclasses in a File Geodatabase and it worked for me:

and:

Do you have more details (what data sources you tried,  which columns you selected, are the featureclasses used by other open map documents, etc)

0 Kudos
MelanieRosenberg2
Frequent Contributor

I called esri support and we could not reproduce the problem, I ended up reopening the map after a reboot.

0 Kudos
Katie_Clark
MVP Regular Contributor

2019 and still encountering this problem. I need to use the Delete Field (Data Management) tool to delete several dozen fields from a large feature layer. (in this most recent case, 43 fields in a feature layer with 105,533 features). I've tried this workflow in ArcMap and ArcPro on multiple data sets, and in both situations it caused issues. The data set ends up getting corrupted and it often crashes the software as well.

If I go through and delete the fields one at a time, it's usually fine. But the whole point of the Delete Field tool (rather than just right-clicking a column in the attribute table and selecting "delete") is to be able to do multiple fields at once...I would think it should be able to handle this. Are there any ideas as to what could be causing this? 

Thanks for any input. 

Best,
Katie


“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek
0 Kudos
Katie_Clark
MVP Regular Contributor

Update for anyone who may encounter a similar issue:

I spoke with Esri Support and we tried a couple of different things. Ultimately, the workaround we found that suited my workflow needs was to use the Feature Class to Feature Class tool. When using that tool, I deleted the fields I didn't need from the Field Map menu. This created a new feature class in my established geodatabase with only the fields I needed while maintaining my field aliases and domains (this was critical the data will be used in ArcGIS Online and needs to have standard formatting). 

This was done in ArcMap 10.6. 

Best,
Katie


“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek