Null Values

ewong1

Eric Wong
Local time
Today, 15:03
Joined
Dec 4, 2004
Messages
96
I have a query qryChillers that includes IDChiller and dtmDate from tblROrderDetail. Currently the query pulls up any records from tblROrderDetail that show IDChiller has not been cleaned in the past seven days.

SELECT tblROrderDetail.IDChiller, Max(tblROrderDetail.dtmDate) AS MaxOfdtmDate
FROM tblROrderDetail
GROUP BY tblROrderDetail.IDChiller
HAVING (((Max(tblROrderDetail.dtmDate))<Now()-7))
ORDER BY tblROrderDetail.IDChiller;

Is there a way for me to set up the query so that it will also pull up IDChiller in any case that a record has not been entered at all?
EXAMPLE: The database has been created and there are records showing that chillers 1-15 have been cleaned(the query returns only the ones that have not been cleaned over the past seven days) - how do I get it to also return chillers 16-25 which do not have any record of being cleaned at all?
 
Union Query

How do I create the union between the two queries to enable the correct results?
 

Users who are viewing this thread

Back
Top Bottom