1

I would like to link the two attribute tables (see image). However, as far as I know, I need two columns with the same name for the link. Is there an alternative so that I can link the two attribute tables or line layers without columns with the same name?

enter image description here

2
  • Sure, just manually expand one of the tables =P or join them by location, if possible.
    – Erik
    May 3, 2023 at 9:31
  • I tried to add a column called 'OBJECTID' to link them, but if try to join them the other columns don't have any values :/ I think both columns should contain the same value
    – vuayalo
    May 3, 2023 at 10:49

1 Answer 1

6

To do an attribute join you need two columns containing the same / matching data. Note that they also need to have the same datatype. E.g. Integer to string won't match. The names of the columns do not matter.

If you do have the required information, open the layer properties of the layer you want to add the data to, navigate to Joins, and click the little green plus plus at the bottom and choose your layer to join as well as the two matching fields. Additionally, you can choose some other settings as well. Note that this type of join is not permanent and only within your QGIS project. If you want to make the join permanent, export the joined layer as a new data file.

If you do not have matching data, you simply cannot do an attribute join. But you can maybe do a spatial join if they share some common spatial relations. If so, please add this to your question body.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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