我試圖從週末日期中整理數據庫中的值。我在7個數據庫中的6個函數上使用的函數(它們的構造都是相同的)。第七個數據庫不起作用。我得到的表達過於複雜的錯誤。任何幫助找出原因?訪問:表達式太複雜,無法進行評估
這裏是我的代碼:
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");
第7個數據庫中的數據有什麼不同?具體而言,由於您正在對某些字段進行格式設置和計算,有沒有可能導致計算失敗或未定義的地方? – thursdaysgeek