Gingertrees
Well-known Member
- Joined
- Sep 21, 2009
- Messages
- 697
Trying to query a call list to pull people who haven't been contacted since a certain date. So if my date is 10/10/2012, I want all people who's last contact was 10/10, 10/1, et al. I do not want to see people who were called by 10/10 but have been contacted since. Likewise, if multiple calls were made, I only need to see John Doe ONCE.
Tables are consumers and calls. Call date = CDate. Callbackdate = when they should (have) been called back.
Here's the query's SQL. Currently this pulls one record for each consumer who was called by the specified date, but does NOT check whether or not they have been contacted since.
Tables are consumers and calls. Call date = CDate. Callbackdate = when they should (have) been called back.
Here's the query's SQL. Currently this pulls one record for each consumer who was called by the specified date, but does NOT check whether or not they have been contacted since.
Code:
SELECT DISTINCT Consumers.Phone, Consumers.CName, Consumers.Address, Consumers.City, Consumers.State, Consumers.Zip, Consumers.[Serial #], Consumers.Timezone, Calls.Notes, Calls.User, Calls.Callbackdate, Calls.CDate
FROM Consumers INNER JOIN Calls ON Consumers.ID = Calls.ConsumerRecord
WHERE (((Calls.CDate)<[End Date?]))
ORDER BY Calls.User;