Hey, I cant seem to find where the syntax error is in this SQL subquery.
thanks,
Code:
(SELECT Peak
FROM qryPrep AS Alias
WHERE MonthlyDate =
(SELECT Max(MonthlyDate)
FROM qryPrep AS Alias2
WHERE Alias2.MonthlyDate < qryPrep.MonthlyDate
AND Alias2.ProductID = qryPrep.ProductID) ) As Prior