Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This view displays a list of all the fields, along with their field properties. In the Field Name column, locate the Land.LAND_USE_C field. To the right, in In the Data Type column to the right, notice that the data type is Long, which stands for long integer. In other words, the data is stored in a numeric field. Further down, locate the LandUseCode_LookupTable.LANDUSE_CODE field. To the right, notice that the data type is Text. Even if the 4-digit codes stored in both fields are identical, the join will not work if one table stores the values as text and one stores the values as numbers. If the data types in both fields had matched, then the join error would likely have been due to the actual data (or 4-digit codes) being different or selecting the incorrect column name on which to perform the join.

In order to successfully perform a join, the corresponding join fields in the respective both tables must be of the same field type. Unlike in Excel, you cannot simply convert an existing field from one type to another. Instead, you must create a new field of the correct field type and copy the data over into the new field. In this case, you will convert the LAND_USE_C field in the Land table to a string text field type to match the string text field type used in the LandUseCode_LookupTable table.

  1. In the Catalog pane, right-click the Land table > and select Design > Fields.
  2. At the bottom, click ‘Click Click here to add a new field’field.
  3. For ‘Field Name’, typeLAND_USE_C_Textand press Enter.
  4. For ‘Data Type’, click once to highlight Long and activate the field and then click Long a second time and use the drop-down menu to select Text instead.
  5. On the ribbon, the Fields tab , click Save.should now be active. In the Changes group on the far right, click the Save button to save the changes to the design of the Land table fields.

The The new LAND_USE_C_Text field has now been added to the end of the Land table.

  1. Close the ‘Fields’ window both table Fields: views.
  2. In the Catalog pane, right-click the Land table and select Open.
  3. Right-click the LAND_USE_C_Text field name and select Calculate Field.

Over the Catalog On the right, in the Geoprocessing pane, the Calculate Field geoprocessing pane tool will appearopen.,

  1. In the Fields menulist, double-click the LAND_USE_C field.

Notice that the box at the bottom of the ‘Field Calculator’ pane below now reads LAND_USE_C_Text = [!LAND_USE_C]!, as shown below. This statement will copy all of the content from the original LAND_USE_C integer field to into the new LAND_USE_C_Text text field.

...

Image Added

  1. Click Run.

Ensure that the land use codes have, indeed, been copied over into the new LAND_USE_C_Text field and that they are left-aligned as text, rather than right-aligned as numbers.

  1. Close the attribute tables.

...

  1. In the Contents pane, right-click the DowntownParcels layer name and selectJoins and Relates > Remove Join(s) > Remove All Joins.

You will now repeat the process of joining both tables.

  1. In the Contents Pane, right-click the DowntownParcels layer and select Joins and Relates > Add Join.
  2. For ‘Input Join Field’, select the HCAD_NUM field.
  3. For ‘Join Table’, select the Land table.
  4. For ‘Output Join Field’, select the ACCOUNT field.
  5. Ensure that the ‘Add Join’ pane matches that shown below and click OK.

 

...

In the Geoprocessing pane, the Remove Join tool will open.

  1. For 'Layer Name or Table View', leave the default DowntownParcels layer selected.
  2. For 'Join', use the drop-down menu to select the LandUseCode_LookupTable table.

You will now repeat the process of joining the lookup

...

table.

  1. In the Contents pane, right-click the DowntownParcels layer and select Joins and Relates > Add Join.
  2. For ‘Input Join Field’, select the new Land.LAND_USE_C_Text field.
  3. For ‘Join Table’, select the LandUseCode_LookupTable table.
  4. For ‘Output Join Field’, select the LANDUSE_CODE field.
  5. Ensure that the ‘Add Join’ pane matches that shown below and click OK.

...

  1. Right-click the DowntownParcels layer and select Attribute Table.
  2. Scroll In the DowntownParcels table view, scroll to the right and browse through all of the attributes.

Notice that the generalized group code and description fields have been added to the end of the attribute table.

  1. Close the DowntownParcels attribute table.
  2. In the toolbar at the top of the document, click Save.

...