I have two vector shapfiles with polygons and I want to add the ID number of the polygon of one shapefile to overlapping polygons of the other shapefile. For example I have a polygon in shapefile A that has ID = 1, so I want all polygons in shapefile B that lay within this polygon in shapefile A to have ID = 1 as well.
I already tried "Join attributes by location", which generates a new shapefile with all the polygons of shapefile B, but each one then has ID = 0. Is there a decent automatic approach to do this in QGIS? Help very appreciated. Thanks in advance!