我对 MS Access 2013 中的以下查询有疑问:
SELECT *
FROM (((
(SELECT Stop.TAGeoID AS TAGeoID,
Trip.TripNo AS TripNo
FROM ((((Trip
INNER JOIN BTStopTimes ON Trip.TripNo = BTStopTimes.TripNumber)
INNER JOIN TripsTxt ON (Trip.TripNo = TripsTxt.trip_id
AND Left(TripsTxt.shape_id, 3) <> 'ELD'))
INNER JOIN PatternDetail ON Trip.PatternID = PatternDetail.PatternID
AND BTStopTimes.Sequence = PatternDetail.StopSortOrder)
INNER JOIN Stop ON Stop.GeoID = PatternDetail.GeoID)) AS t3
LEFT JOIN
(SELECT F10,
F16
FROM PatternStopsRaw
WHERE F16 <> ''
GROUP BY F10,
F16)R ON R.F10 = t3.TAGeoID)
LEFT JOIN Timepoint ON Timepoint.PlaceID = R.F16)
LEFT JOIN
(SELECT *
FROM t3
INNER JOIN TripDetail ON t3.TripNo = TripDetail.TripNo)TripTripDetail ON (Timepoint.TimePointID = TripTripDetail.TimepointID))
它说有语法错误
The Microsoft Access database engine cannot find the input table or query t3. Make sure it exists and that its name is spelled correctly
似乎 Access 不允许从同一查询中的命名查询中进行选择。
有什么建议么?
PS:* 仅用于测试目的,一旦我有工作查询,我将删除它们。