I have this query that is pulling incorrect data. For example, My Start Date is 06/24/02 and my End Date is 06/24/02. When I run this, it pulls 06/25/02 also.
Is this query wrong?
SELECT DISTINCTROW INDIV_TP_SUB.CHILD_TP AS TP, INDIV_TP_SUB.SCRUB_DATE AS [Scrub Date], Count(pend_list.CLAIM_NO) AS [Pended Total], [Enter Start Date:] & " - " & [Enter End Date:] AS [Given Time Period]
FROM pend_list INNER JOIN INDIV_TP_SUB ON (pend_list.TP = INDIV_TP_SUB.CHILD_TP) AND (pend_list.SCRUB_DATE = INDIV_TP_SUB.SCRUB_DATE)
WHERE (((pend_list.SCRUB_DATE) Between [Enter Start Date:] And [Enter End Date:]) AND ((pend_list.TP)=[INDIV_TP_SUB].[CHILD_TP]) AND ((pend_list.ERROR_1) In (502,791)) OR (pend_list.ERROR_2) In (502,791)) OR (pend_list.ERROR_3) In (502,791)
GROUP BY INDIV_TP_SUB.CHILD_TP, INDIV_TP_SUB.SCRUB_DATE
ORDER BY INDIV_TP_SUB.CHILD_TP DESC;
Thanks for the help.
Is this query wrong?
SELECT DISTINCTROW INDIV_TP_SUB.CHILD_TP AS TP, INDIV_TP_SUB.SCRUB_DATE AS [Scrub Date], Count(pend_list.CLAIM_NO) AS [Pended Total], [Enter Start Date:] & " - " & [Enter End Date:] AS [Given Time Period]
FROM pend_list INNER JOIN INDIV_TP_SUB ON (pend_list.TP = INDIV_TP_SUB.CHILD_TP) AND (pend_list.SCRUB_DATE = INDIV_TP_SUB.SCRUB_DATE)
WHERE (((pend_list.SCRUB_DATE) Between [Enter Start Date:] And [Enter End Date:]) AND ((pend_list.TP)=[INDIV_TP_SUB].[CHILD_TP]) AND ((pend_list.ERROR_1) In (502,791)) OR (pend_list.ERROR_2) In (502,791)) OR (pend_list.ERROR_3) In (502,791)
GROUP BY INDIV_TP_SUB.CHILD_TP, INDIV_TP_SUB.SCRUB_DATE
ORDER BY INDIV_TP_SUB.CHILD_TP DESC;
Thanks for the help.