4

This question already has an answer here:

I have this kind of csv attribute table:

          ID INVENT_KPV KASVUKOHA_KOOD RINDE_KOOD PUULIIGI_KOOD VANUS
297945203711 2009.08.31             MO          1            KS    60
297945203711 2009.08.31             MO          2            KU    50
297945303711 2009.08.31             SS          1            MA    60
297945303711 2009.08.31             SS          1            KS    60
297945403711 2009.08.31             JO          1            HB    NA

As you can see, there are 3 different ID codes. I have also a map in QGIS and I want to join this attribute table and the map together but the problem is that when I use the button "info" in QGIS and click on the map then it shows me only information about one row not all of them (which have the same IDs).

For example, if I click somewhere in the map where's a patch with ID 297945303711 then it only shows me: 2009.08.31, SS, 1, MA, 60 and not 2009.08.31, SS, 1, KS, 60.

marked as duplicate by underdark qgis Feb 16 at 18:10

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

QGIS3

At the time of question, it required either relation or virtual layer approach.

Now there is a new function Join attributes by field value which can handle one-to-many relationship.

enter image description here

You have ID codes in both layers, so just assign it to both Table field and Table field 2.

enter image description here

This tool duplicates the feature to accommodate multiple input records.

Also note the last record in the above example ID= 297945403711 does not have any corresponding data in your CSV, so it ends up with blank cells other than the data from original feature.

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