Versions Compared

Key

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

...

You will now examine the two tables more closely to determine why the join resulted in null values.

  1. In At the Contents pane, right-click the Land table and select Open.
  2. Right-click the LandUseCode_LookupTable table and select Open.

 

 

Notice at the top left of the ‘Table’ window, you see one tab for each of the two tables that are open, but you want to be able to examine both tables simultaneously.

 

  1. Select the title of your ‘Table’ window, drag it to the middle of your Map Window, and hover it over the left most of the four placement options until it changes color. Release. It should snap to the left side of the Map Window. Repeat for the other attribute table.

 

When looking at a table, any column that is left-aligned is treated as text and any column that is right-aligned is treated as a number. Examine the two fields that you were previously attempting to join. Notice that the LAND_USE_C field in the Land table is right-aligned as a number and the LANDUSE_CODE field in the LandUseCode_LookupTable table is left-aligned as a text. For further confirmation of this problem, you will examine the properties of each field.

...

  1. top right of the DowntownParcels table view, click the collapsed menu icon (or hamburger button) and select Fields View.

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 the Data Type column, 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 perform a join, the corresponding join fields in the respective 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 field type to match the string field type used in the LandUseCode_LookupTable table.

...