Need to eliminate duplicates between two queries

  • Thread starter Thread starter Les
  • Start date Start date
L

Les

This will work for your given example. I bet your
departments aren't really A and B, but maybe this will
give you a starting point.

Create a query, selecting SR, Requestor, and Department.
Change it to a totals query.
Keep "group by" for SR and Requestor. Change "group by"
to "MIN" for Department.

HTH
-----Original Message-----
Hi,

I have two queries with very simlar output:

[Service Request],[requestor],[department]

The only difference is which department is taking care of
the service request (Department B is a subdivision of
Department A). I can find unique service requests for
each department, but there are some requests where both
departments are affected. Since one department is a
subdivision of the other, I need to only count each
service request once (Dept A supercedes Dept B),
eliminating any duplicates that may exist between the two,
yet preserving any service requests that are uniqe to each
department. For instance
Input:

SR Reqeustor Dept
SR Reqeustor Dept
A 2
x B
A 3
y B
A 5
q B
 
That works. Thanks a lot.

And you're right, the departments aren't A an B, but as the Bard said, what's in a name?

Les said:
This will work for your given example. I bet your
departments aren't really A and B, but maybe this will
give you a starting point.

Create a query, selecting SR, Requestor, and Department.
Change it to a totals query.
Keep "group by" for SR and Requestor. Change "group by"
to "MIN" for Department.

HTH
-----Original Message-----
Hi,

I have two queries with very simlar output:

[Service Request],[requestor],[department]

The only difference is which department is taking care of
the service request (Department B is a subdivision of
Department A). I can find unique service requests for
each department, but there are some requests where both
departments are affected. Since one department is a
subdivision of the other, I need to only count each
service request once (Dept A supercedes Dept B),
eliminating any duplicates that may exist between the two,
yet preserving any service requests that are uniqe to each
department. For instance
Input:

SR Reqeustor Dept
SR Reqeustor Dept
A 2
x B
A 3
y B
A 5
q B
Output:

SR Requestor Dept
1 x A
2 x B
3 y A
4 z A
5 q B


Thanks in advance
.
 
Back
Top