Hi there,
I've little experience programming queries in Access and I can't figure out why the error in Title is happening when I try to execute the following query:
--------------------------------------------------------------
select
SinceTo.ID, Registros1.Price as Initial, Registros2.Price as Final
from
(
select
ID, min(fecha) as firstdate, max(fecha) as lastdate
from
Registros
group by ID
) as SinceTo
inner join Registros as Registros1 on Registros1.fecha = SinceTo.firstdate AND Registros1.ID=SinceTo.ID
inner join Registros as Registros2 on Registros2.fecha = SinceTo.lastdate AND Registros2.ID=SinceTo.ID
--------------------------------------------------------------
The table Registros does only contain 3 fields:
* ProductID
* Date (=fecha)
* Price for each Date
And the query tries to get the Initial Price and the Last Price for each ProductID.
Does anyone have an idea of where the error is? Thank you in advance!!