我在 Microsoft Access SQL 中收到循环引用错误。
SELECT a.PlateNo, a.colm, a.alain
FROM (SELECT PlateNo, alain, min(InspectionDate) AS colm
FROM [Vehicle Spot Check] GROUP BY PlateNo)
AS a
INNER JOIN [Vehicle Spot Check] AS m
ON (a.alain = m.WithoutDefects) AND (a.colm = m.InspectionDate)
AND (a.PlateNo = m.PlateNo);
我收到此错误:
Circular reference caused by alias '' in query definition's Select List.
我不知道是哪一个,因为没有指定字段。我的主要嫌疑人是m.WithoutDefects
,但我已经仔细检查过。有没有办法找到这个?我在想的也是“Inner Join”之后的语法问题。