I have a database in Access and one of my queries has 7 SELECT statements. The problem is that I have multiple inheritance and I have to retrieve information from the super most class and combine it with information from the sub most class but I change the primary key. It looks something like this:
The result from the previous SELECT statments has one nr column and then I have B(*id_U, nr) -> A(data1, data2, id).
So to say, I have in the result some numbers, that corespond to data1 and data2 in A via the nr and id. I have to output nr, data1, data2. How can I do that? I can output only data1 and data2, but how do I add the nr?
SELECT A.data1, A.data2
WHERE A.id IN (SELECT B.id_U
WHERE B.nr IN (SELECT ...));