Hello. The query I created is inadvertently NOT pulling in any duplicate records in the query results. I do need the duplicate records.
I created my queries using SQL, and I have not included any DISTINCT logic.
So my question is, looking at the code below, how come my query is not pulling in duplicate records, and what can I do to change to code to ensure I am getting the duplicate records.
Thanks in advance for your help!! I'm new to Access and thought I had my database figured out, but now I'm running into this major problem.
SELECT drug_ndc_id, fill_dt, client_id, blg_reporting_cd, group_cd, net_cost_at
FROM [2005 Q3]
WHERE ((([2005 Q3].client_id)=[Forms]![Client ID Search].
[List0]) AND (([2005 Q3].NET_COST_AT)>0) AND (([2005 Q3].FILL_DT)>#5/4/2005# And ([2005 Q3].FILL_DT)<#9/28/2012#))
UNION SELECT drug_ndc_id, fill_dt, client_id, blg_reporting_cd, group_cd, net_cost_at
FROM [2005 Q4]
WHERE ((([2005 Q4].client_id)=[Forms]![Client ID Search].
[List0]) AND (([2005 Q4].NET_COST_AT)>0) AND (([2005 Q4].FILL_DT)>#5/4/2005# And ([2005 Q4].FILL_DT)<#9/28/2012#))