我有以下查询,它只给我(除了其他列)方向 ID:
SELECT Users.Name, Users.Surname, Transactions.Timestamp, AccessPoints.Description as Door, Readers.Direction
FROM (Readers INNER JOIN (AccessPoints INNER JOIN Points_Readers ON AccessPoints.PointID = Points_Readers.PointID)
ON Readers.ReaderID = Points_Readers.ReaderID) INNER JOIN (Transactions INNER JOIN (AccessNumbers INNER JOIN Users
ON AccessNumbers.AccessNumberID = Users.AccessNumberID) ON Transactions.Number = AccessNumbers.Number)
ON Readers.ReaderID = Transactions.ReaderID
WHERE (Transactions.Timestamp>#2018-08-15 06:50:16#) ORDER BY Transactions.Timestamp;
我想要做的是Directions.DirectionsText
通过加入ONReaders.Direction
来扩展查询以包括在内。我在确定连接的确切位置时遇到了麻烦,这样我就不会一直在子句中出错。(我仍然没有弄清楚如何让子句与 Access 一起工作需要使用括号进行连接。)Directions
Directions.Direction
FROM
INNER JOIN
中的列Directions
是Direction
(数字)和DirectionText
(字符串)