Join had no matches but two attribute fields have same name

1028
8
Jump to solution
05-06-2024 08:26 AM
dwold
by
Frequent Contributor

I get a message saying no matches but my attributes have the same name and are indexed. Both files are in the same geodatabase.

dwold_0-1715009156914.png

dwold_1-1715009185358.png

 

0 Kudos
2 Solutions

Accepted Solutions
George_Thompson
Esri Notable Contributor

Is one of the fields a STRING and the other a NUMERIC?

"The name of the field does not have to be the same, but the data type must be the same; you join numbers to numbers, strings to strings, and so on."
https://pro.arcgis.com/en/pro-app/latest/help/data/tables/joins-and-relates.htm#GUID-39C9610A-6A73-4...

--- George T.

View solution in original post

Ed_
by MVP Regular Contributor
MVP Regular Contributor

Yup it seems like both the fields have a different data type. so you will have to match those. Usually it's best practice to first import the CSV as a geodatabase table to your database using the "table to geodatabase" tool. And then change the data type accordingly.

CSVs when brought into Pro sometimes have a habit to assigning wrong data types to fields. So maybe the FIPS column in your CSV data was taken as a text field.

Usually with FIPS I just convert the column to a numeric data type as that also removes any extra spaces if there are any.

If this reply helped you then you can also accept this post as an answer, thank you.

Question | Analyze | Visualize

View solution in original post

8 Replies
Ed_
by MVP Regular Contributor
MVP Regular Contributor

Did you check their data type?

Question | Analyze | Visualize
dwold
by
Frequent Contributor

@Ed_ hello - one is a File Geodatabase Feature Class (points_county_damage), the other is csv table (summary_damage_points_county). Trying to join the table data to the File Geodatabase Feature Class

0 Kudos
Ed_
by MVP Regular Contributor
MVP Regular Contributor

Yup it seems like both the fields have a different data type. so you will have to match those. Usually it's best practice to first import the CSV as a geodatabase table to your database using the "table to geodatabase" tool. And then change the data type accordingly.

CSVs when brought into Pro sometimes have a habit to assigning wrong data types to fields. So maybe the FIPS column in your CSV data was taken as a text field.

Usually with FIPS I just convert the column to a numeric data type as that also removes any extra spaces if there are any.

If this reply helped you then you can also accept this post as an answer, thank you.

Question | Analyze | Visualize
George_Thompson
Esri Notable Contributor

Is one of the fields a STRING and the other a NUMERIC?

"The name of the field does not have to be the same, but the data type must be the same; you join numbers to numbers, strings to strings, and so on."
https://pro.arcgis.com/en/pro-app/latest/help/data/tables/joins-and-relates.htm#GUID-39C9610A-6A73-4...

--- George T.
dwold
by
Frequent Contributor

This was the issue. One was a text the other was long. Once I made both long the join worked. Thanks!

GF3
by
New Contributor

How did you make them both 'long'?  I have Attribute Table as text and Join table as Long.

Thank you!

0 Kudos
Ed_
by MVP Regular Contributor
MVP Regular Contributor

if you are saying that one of your matching columns is text and the other is long

then you will first have to create a new column with data type long > go to its calculate field > set it equal to the matching column that is text (assuming that the numbers are stored as text) 

Question | Analyze | Visualize
0 Kudos
RhettZufelt
MVP Notable Contributor

Have you ensured that there are no spaces after the FIPS number in both datasets?

'47005 ' will not join to '47005'

R_