mlee1steph
Programmer
Hi Everyone,
I have a query that returns clients that have attended the program. But I now need to update the query so that it does the above, but also clients that did not attend within the date range and that are activeclients. Would you mind a few pointers in the right direction. Here is the query I'm working with:
SELECT DISTINCT PATIENTS.PatientID, PATIENTS.LastName+', '+PATIENTS.FirstName AS P_NAME,
PATIENTS.MEDICAID_ID, COUNSELORS.C_LastName+', '+COUNSELORS.C_FirstName AS C_NAME,
TERMINATION.DOT, TERMINATION.DOA, ATTENDANCE.AttendDate, ATTENDANCE.SecurityTime,
ATTENDANCE.GroupTime, ATTENDANCE.COUNSELOR
FROM ((COUNSELORS INNER JOIN PATIENTS ON COUNSELORS.C_ID = PATIENTS.COUNSELOR)
INNER JOIN ATTENDANCE ON PATIENTS.PatientID = ATTENDANCE.PatientID)
INNER JOIN TERMINATION ON PATIENTS.PatientID = TERMINATION.PatientID
WHERE (((ATTENDANCE.AttendDate) Between '12/1/2006' And '12/30/2006')
AND ((PATIENTS.ActiveClient)=1))
Thanks for any help.
Michael lee
I have a query that returns clients that have attended the program. But I now need to update the query so that it does the above, but also clients that did not attend within the date range and that are activeclients. Would you mind a few pointers in the right direction. Here is the query I'm working with:
SELECT DISTINCT PATIENTS.PatientID, PATIENTS.LastName+', '+PATIENTS.FirstName AS P_NAME,
PATIENTS.MEDICAID_ID, COUNSELORS.C_LastName+', '+COUNSELORS.C_FirstName AS C_NAME,
TERMINATION.DOT, TERMINATION.DOA, ATTENDANCE.AttendDate, ATTENDANCE.SecurityTime,
ATTENDANCE.GroupTime, ATTENDANCE.COUNSELOR
FROM ((COUNSELORS INNER JOIN PATIENTS ON COUNSELORS.C_ID = PATIENTS.COUNSELOR)
INNER JOIN ATTENDANCE ON PATIENTS.PatientID = ATTENDANCE.PatientID)
INNER JOIN TERMINATION ON PATIENTS.PatientID = TERMINATION.PatientID
WHERE (((ATTENDANCE.AttendDate) Between '12/1/2006' And '12/30/2006')
AND ((PATIENTS.ActiveClient)=1))
Thanks for any help.
Michael lee