我有一个MS Access问题
我一直在努力处理一个包含带有日期范围的连接的查询。我发现了几个关闭的帖子,但没有让它工作
我有两张桌子。一个包含一些数据和到期日的。
Table A
Field 1, Field 2, Field 3, Due Date另一个表包含有关期间的信息。
Table B
Periodname, Field X/Y/Z, StartDate, EndDate我尝试使用以下输出进行查询
Field 1, Field 2, Due Date, Periodname希望你能帮上忙。
发布于 2016-04-20 15:30:27
在MsAccess中,您实际上可以使用<和>编写联接语句,尽管您不能在查询编辑器中显示它。
SELECT [Field 1], [Field 2], [Field 3], [Due Date], PeriodName
FROM A INNER JOIN B ON A.[Due Date] >= B.StartDate AND A.DueDate <= B.EndDate发布于 2016-04-20 15:04:11
你可以通过where子句来“连接”:
Select
Field1,
Field2,
DueDate,
Periodname
From
TableA,
TableB
Where
DueDate Between StartDate And EndDate发布于 2016-04-20 16:27:28
这就是我到目前为止创建的东西,但是我在“介于”命令上得到了一个错误。“您使用了运算符'Between‘,而没有'And’。
选择左侧(Q_Epics.Component/s,3)作为Proj_Nr,选择Mid(Q_Epics.Component/s,6,35)作为项目,选择Q_Epics.Epic Key、Q_Epics.Summary、Q_Epics.Labels、Q_Epics.Due Date和Sprints.Sprint作为冲刺
来自Q_Epics
在Sprints.StartSprint和Sprints.EindeSprint之间的Q_Epics.Due Date上左联Sprint
GROUP BY Left(Q_Epics.Component/s,3)、Mid(Q_Epics.Component/s,6,35)、Q_Epics.Epic Key、Q_Epics.Summary、Q_Epics.Labels、Q_Epics.Due Date、Q_Epics.EpicStatus
有(Q_Epics.EpicStatus)<>“Closed”))
按Q_Epics.Due日期排序;
https://stackoverflow.com/questions/36735333
复制相似问题