I use QGIS 3.4 as a beginner.

I have a vector layer 'Address' with the fields:

"postalcode" (str)

and a CSV-file with the fields

"section" (int)
"postalcode" (str)
"housenr_low" (int)
"housenr_high" (int)

I want to add the field "section" from the CSV -ile to the 'Address' layer where Address.postalcode = CSV.postcalcode and Address.housenr >= CSV.housenr_low and Address.housenr <= CSV.housenr_high.

I tried "join with the attribute table" and "Join attributes by field value" without success.

How can I do this?

1 Answer 1


I found a workaround by using Layer > Add Layer > Add/Edit Virtual Layer... to create first a link tabel with only key fields and in a second step "Join attributes by field value".

But because my case is so common, there must be a beter solution out of the box with QGIS. So I hope an experienced GIS expert tell us how to do this.

  • 1
    It is possible to do it in one step but for performance reasons I choose the extra step. The tip for using a Virtual Layer came from editor Taras, my thanks to him.
    – Jan
    Apr 2, 2020 at 7:25

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.