J
Jeff Gross
I have the following MS Query inside my spreadsheet:
SELECT `HS_Incident$`.`Plant Name`, `HS_Incident$`.`Incident Desc`,
Format(`HS_Incident$`.`Incident Date`,'dd-mmm-yyyy'),
Format(`HS_Incident$`.`Report Date`,'dd-mmm-yyyy'), `HS_Incident$`.`Lost Time
Case`, `HS_Incident$`.`Incident Status`
FROM `C:\Reports\HS_Incident`.`HS_Incident$` `HS_Incident$`
WHERE (`HS_Incident$`.`Plant Name`<>'MARKHAM ') AND
(`HS_Incident$`.`Incident Status` Not Like 'SUBM%' And
`HS_Incident$`.`Incident Status` Not Like 'SAVE%' And
`HS_Incident$`.`Incident Status` Not Like 'REJE%')
ORDER BY `HS_Incident$`.`Report Date`
I would like to add another criteria that will only pull data from the last
7 days. I tried this:
AND (Datediff('d',[HS_Incident$].[Report Date],date())<=7) but it only
works sometimes. At other times, I get a data type mismatch error.
Does anyone have any ideas?
SELECT `HS_Incident$`.`Plant Name`, `HS_Incident$`.`Incident Desc`,
Format(`HS_Incident$`.`Incident Date`,'dd-mmm-yyyy'),
Format(`HS_Incident$`.`Report Date`,'dd-mmm-yyyy'), `HS_Incident$`.`Lost Time
Case`, `HS_Incident$`.`Incident Status`
FROM `C:\Reports\HS_Incident`.`HS_Incident$` `HS_Incident$`
WHERE (`HS_Incident$`.`Plant Name`<>'MARKHAM ') AND
(`HS_Incident$`.`Incident Status` Not Like 'SUBM%' And
`HS_Incident$`.`Incident Status` Not Like 'SAVE%' And
`HS_Incident$`.`Incident Status` Not Like 'REJE%')
ORDER BY `HS_Incident$`.`Report Date`
I would like to add another criteria that will only pull data from the last
7 days. I tried this:
AND (Datediff('d',[HS_Incident$].[Report Date],date())<=7) but it only
works sometimes. At other times, I get a data type mismatch error.
Does anyone have any ideas?