我正在尝试在周末日期之前从数据库中整理出值。我在 7 个数据库中的 6 个上使用函数的脚本(它们的构造都相同)。第 7 个数据库不起作用。我得到表达式太复杂的错误。任何帮助找出原因?
这是我的代码:
SELECT UPC_Test.Type,
UPC_Test.[Model No],
UPC_Test.[Model Desc],
UPC_Test.[Serial No],
Format(DateValue([UPC_Test].[Test Date]+7-Weekday([UPC_Test].[Test Date],0)),"m/d/yyyy") AS [Test Date],
UPC_Test.Parameter,
UPC_Test.[Failure Symptom],
UPC_Test.[Repair Action],
UPC_Test.[Factory Select],
UPC_Test.[Test Station]
FROM UPC_Test
GROUP BY UPC_Test.Type,
UPC_Test.[Model No],
UPC_Test.[Model Desc],
UPC_Test.[Serial No],
Format(DateValue([UPC_Test].[Test Date]+7-Weekday([UPC_Test].[Test Date],0)),"m/d/yyyy"),
UPC_Test.Parameter,
UPC_Test.[Failure Symptom],
UPC_Test.[Repair Action],
UPC_Test.[Factory Select],
UPC_Test.[Test Station]
HAVING (((UPC_Test.Type)="Production")
AND ((Format(DateValue([UPC_Test].[Test Date]+7-Weekday([UPC_Test].[Test Date],0)),"m/d/yyyy"))=[Enter])
AND ((UPC_Test.[Failure Symptom])<>"")
AND ((UPC_Test.[Repair Action])<>"")
AND ((UPC_Test.[Test Station])="UPC RF Test"))
ORDER BY Format(DateValue([UPC_Test].[Test Date]+7-Weekday([UPC_Test].[Test Date],0)),"m/d/yyyy");