[GIS] Attribute joins – string and text fields

arcgis-10.3arcgis-desktopattribute-joinscsvexcel

I am trying to perform an attribute join, and it's just not happening for me. The Excel field (csv) is formatted as text. This is because it is prefixed with a 0 which is lost if it's any other format (e.g. 0100). The field I am trying to join to in the attributes table is "string".

I am using ArcGIS 10.3.1

In the join pane, the table I am wanting to join (excel) is visible in drop down 2, with the fields visible in drop down 3. However, when I select the field that the layer will join (attributes table) (drop down 1) all my field options in drop down 3 disappear.

What am I doing wrong?

Best Answer

Are you trying to join a .CSV file to your attribute table? Because a CSV file doesn't retain any excel formatting information. Either way, it sounds like ArcGIS is deciding that your 'string' field is better suited as an integer field.

If you use the 'Table to Table (Conversion)' tool you can tell ArcGIS to use specific field types for all of your fields. Refer to the image below and the tool's help on how to to this.

Table to Table - Field Mapping EDIT: I'm not too clear on what errors you're getting or whether you're doing an attribute join as opposed to a spatial join, but your original error (where your CSV's fields disappear after selecting the attribute field to join on) is caused by field types not matching; I.e. you can't join a string field to an integer field, because the string '100' is not the same as the integer 100. If you map your CSV's field to be of the same type as the field you're joining it should fix that error. To find out what data type the field is mapped as, right click the field name in the attribute table and select 'Properties'. The field's data type will be shown in the pop-up window.

field data type 1 field data type 2

Related Question