I'm trying to sort out values from a database by the weekending date. The script I'm using functions on 6 of my 7 databases (they are all constructed identically). The 7th database doesn't function. I get the expression too complex error. any help figuring out why??
Here is my code:
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");