Hi,
I have tables "A" and B" that are linked through the variable CN6. I want to select the variables of Table B (it is variable INDEX in this case) where the year in Table B is the closest to the year in table A (by closest I mean the closest lower or equal year)
I wrote the following query
SELECT A.Deal, B.INDEX
FROM A INNER JOIN B ON A.CN6 = B.CN6
WHERE (((B.INDEX)=Max([B].[year]<=[B].[Year])));
I am receiving an error that I cannot use an aggregate function in the where clause.
Any help will be greatly appreciated