Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two queries, unique data dilemma,

Status
Not open for further replies.
Sep 25, 2002
159
US
Hello again,

I have two queries that pull from the same pool of data. the main source of data is a UNION query that I have created which pulls from various Excel files. I need to send data, in the form of an access report to multiple people, but the data pulled from the UNION query CANNOT be duplicates.

For example, if I have 20 rows of data in my UNION query, person A must receive rows 1-5, person B, must receive rows 6-10, etc.

I was thinking of doing this by copying the records I pull for person A from the UNION query into an externalTable_1. Then before the query for person B is run, I will check the externalTable_1 to see if the records are in there, if they are, these records will not be sent, then do an APPEND UPDATE to externalTable_1 with the records just sent to person B, and repeat this process.

I've been thinking about this one all night it doesn't seem like the most efficient way to do it. I'd like the experts' opinions.

Thank you,

Sr
 
do you think you could pursue this in the Access forum? this forum is for ANSI SQL

furthermore, UNION (as opposed to UNION ALL) removes duplicates, so if you have a UNION query, it is already "dupe free"

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top