4

I have two tables (one is actually a shapefile and the other one is a comma separated file).

I really need your help with joining the csv file table (which has many rows for one ID number) with the shapefile attribute table, so when I'll identify something in the map, it'll show me all those rows.

I tried joining, I also tried importing these to geodatabase and I tried to change the field type of the csv attribute table (because it didn't let me to join otherwise). But it didn't work, those other two rows went still missing.

My steps doing this with geodatabase files.

First I made a geodatabase: First I made a geodatabase

Then I imported the shapefile and the tabel: Then I imported the shapefile After that I added the tabel

I dragged both of these files to arcgis and joined the tables I dragged both of these files to arcgis and joined the tables

And when I searched the ID I know has 3 rows in the original table, I saw that it hasn't added them here in the joined tables (here is only the first row And when I searched the ID I know has 3 rows in the original table, I saw that it hasn't added them here in the joined tables (here is only the first row).

Related tables

There are none related tables after I've made the join. enter image description here

But after I made the join and relate also, I could choose to see them in the table. enter image description here

And I find a way to see the relates also in the indetify box, I had to open that "tree". enter image description here

2

Esri provides a good resource: Joining the attributes from a table

What you need to do is peform a one-to-many join versus the one-to-one join. The issue you are running into with your data is that you have multiple rows in your table that share the same ID. When you perform a one-to-one join the first entry will be joined and the other rows with the same ID get "dropped". However when you have a one-to-many join then those similar ID are all joined to the same ID in your shapefile. Below provides more details and illustrations.

Joining the attributes from a table

Typically, you'll join a table of data to a layer based on the value of a field that can be found in both tables. The name of the field does not have to be the same, but the data type has to be the same; you join numbers to numbers, strings to strings, and so on. You can perform a join with either the Join Data dialog box, accessed by right-clicking a layer in ArcMap, or the Add Join tool.

One-to-one and many-to-one relationships

When you join tables in ArcMap, you establish a one-to-one or many-to-one relationship between the layer's attribute table and the table containing the information you want to join. The example below illustrates a one-to-one relationship between each county and that county's population change data. In other words, there's one population change for each county.

enter image description here

One-to-many and many-to-many relationships

enter image description here

When using data where a one-to-many or many-to-many relationship exists, you should use a relate or relationship class to establish the relationship between the datasets. However, it is possible to create a join under these circumstances. When you create a join in such a case, there are differences between how tools and other layer-specific settings work depending on the data source. If you are using geodatabase data to create the join, all matching records are returned. If you are using nondatabase data, like shapefiles or dBASE tables, to create the join, only the first matching record is returned.

This means that if you have created a 1:M or M:M join with geodatabase data and you generate a report, you see multiple records in the report, one for each corresponding match. The multiple matches are also seen when using a join field while symbolizing a joined layer, labeling, identifying features, generating a graph, and using either the Find or Hyperlink tool. If you are using the joined layer as input to a geoprocessing tool or in an export operation, the multiple matching records are used.

View table enter image description here and can reference this as an alternative as well How To: Create a one-to-many join in ArcMap

Instructions provided describe how to create a table with a one-to-many mapping to another table.

  • Thank you for answering. Actually I'd already read this and I already tried to join with geodatabase data. I did that and after when I opened attribute table, there still wasn't multiple matching records. :/ – M.P. Jan 14 '17 at 16:10
  • It would be helpful for you to show the exact steps you did, screen shots would be great as well. – whyzar Jan 14 '17 at 16:15
  • I updated the original post, you can see the steps there. – M.P. Jan 14 '17 at 16:39
  • Once you performed the join, you need to view the relates table option. I placed a screen shot at the end of my response. – whyzar Jan 14 '17 at 17:20
  • Okay, I actually did it, thanks to you! (I updated my original post too.) I have one question though, why it showed me an error if I tried to make a query table with this expression: kaart.ID = tabel.ID (error: Too few parameters. Expected 1)? – M.P. Jan 15 '17 at 9:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.