Hello,
I am trying to pull records for computer equipment that the test date has exceeded 90 days. I am trying to modify a union query to make this work. I have several tables that I have to search. I cannot change the structure so I have adapted to it.
This is the code I am trying to modify.I am trying to get the WHERE statement correct so it will flag all the records where the test date has exceeded 90 days.
SELECT [SERVER].UnitPart,UnitSerial,TestDate,Technician
FROM [SERVER]
WHERE (((DateDiff("d"[TestDate]>90,Date())); Am I close?????
UNION ALL
SELECT [PRINTER].UnitPart,UnitSerial,TestDate,Technician
FROM [PRINTER]
WHERE (((DateDiff("d"[TestDate]>90,Date()));
UNION ALL
SELECT [LAPTOP].UnitPart,UnitSerial,TestDate,Technician
FROM [LAPTOP]
WHERE (((DateDiff("d"[TestDate]>90,Date()));
UNION ALL
SELECT [WORKSTATION].UnitPart,UnitSerial,TestDate,Technician
FROM [WORKSTATION]
WHERE (((DateDiff("d"[TestDate]>90,Date()));
I would be most grateful for help with this.
THANK YOU,
m0aje
I am trying to pull records for computer equipment that the test date has exceeded 90 days. I am trying to modify a union query to make this work. I have several tables that I have to search. I cannot change the structure so I have adapted to it.
This is the code I am trying to modify.I am trying to get the WHERE statement correct so it will flag all the records where the test date has exceeded 90 days.
SELECT [SERVER].UnitPart,UnitSerial,TestDate,Technician
FROM [SERVER]
WHERE (((DateDiff("d"[TestDate]>90,Date())); Am I close?????
UNION ALL
SELECT [PRINTER].UnitPart,UnitSerial,TestDate,Technician
FROM [PRINTER]
WHERE (((DateDiff("d"[TestDate]>90,Date()));
UNION ALL
SELECT [LAPTOP].UnitPart,UnitSerial,TestDate,Technician
FROM [LAPTOP]
WHERE (((DateDiff("d"[TestDate]>90,Date()));
UNION ALL
SELECT [WORKSTATION].UnitPart,UnitSerial,TestDate,Technician
FROM [WORKSTATION]
WHERE (((DateDiff("d"[TestDate]>90,Date()));
I would be most grateful for help with this.
THANK YOU,
m0aje