HowTo:  Replace the text in multiple fields within an attribute table using the Field Calculator tool

相关信息
Article ID: 42559
Software:
ArcGIS - ArcEditor 10
ArcGIS - ArcInfo 10
ArcGIS - ArcView 10
ArcGIS for Desktop Advanced 10.1, 10.2, 10.2.1, 10.2.2
ArcGIS for Desktop Standard 10.1, 10.2, 10.2.1, 10.2.2
ArcGIS for Desktop Basic 10.1, 10.2, 10.2.1, 10.2.2
Platforms: N/A

问题描述
An attribute table is a database that contains non-spatial information about a set of geographic features in a geographic information system (GIS). The information is arranged so that each row represents a feature and each column represents one feature attribute. In ArcGIS, rows are known as records and columns are fields. Each field stores a specific type of data, such as a number, date, or piece of text.

The instructions provided describe how to use the Replace function in the Field Calculator tool to replace the text in multiple fields within an attribute table without having to edit every record individually.

已邀请:

EsriSupport

赞同来自:

解决方案
To replace values in an attribute table:
  1. In ArcMap, open the feature class or the shapefile.
  2. Open the attribute table of the layer.
  3. Click the Editor menu on the Editor toolbar and select Start Editing.
  4. Right-click the desired field heading on the Attribute Table. This is to ensure only the selected field is amended.
  5. Select Field Calculator.
  6. In the Field Calculator dialog box, type the following in the expression box: Replace()
  7. Double-click the field name from the Fields list to enter the name into the expression box.
  8. Type the value to be replaced and the replacement value; enclose each value in quotation marks and separate with a comma.
  9. Click OK. Notice the changes made onto the selected field.
    Replacing a string of text (such as 'Crabapple' with 'Honeylocust') replaces all instances of the string of text with 'Honeylocust'. For example: • Crabapple > Honeylocust • Crabapple, Beverly > Honeylocust, Beverly • Robinson Crabapple > Robinson Honeylocust To change only 'Crabapple' fields, use the 'Find and Replace' tool and select Whole Field from the Text Match drop-down menu. Use Knowledge Base article 42497 for more information.
  10. Go to the Editor menu and select Save Edits.
  11. Click the Editor menu again and select Stop Editing.


其它相关参考
  1. HowTo: Replace one value for another within a field
  2. ArcGIS Help - Changing the case of text field values
  3. ArcGIS Help - Making simple field calculations
  4. ArcGIS Help - Calculate Field examples
  5. HowTo: Replace the text in multiple fields within an attribute table using the Find and Replace tool


创建及修改时间
Created: 5/14/2014

Last Modified: 6/5/2014
原文链接
http://support.esri.com/en/kno ... 42559

要回复问题请先登录注册