General discussion
August 6, 2002 at 05:09 AM
borginva

Removing Duplicates In Access 2000 Query

by borginva . Updated 24 years, 1 month ago

I have a query that has three tables:
PRODUCT, ORG, SERVICE.

Product.Org_ID and Service.Org_ID are tied into Org.Org_ID. Okay so far?

I have a property called SITE1. The ORG_ID is ORG558. Products are PRO1 and PRO2. Two expire dates under EXPIREDATE. Cool?

I add in fields ORG_ID and ORGNAME from the ORG table and PRODUCT from the PRODUCT table.

I get these results:
ORG558 SITE1 PRO1
ORG558 SITE1 PRO1
ORG558 SITE1 PRO2
ORG558 SITE1 PRO2

After putting in the Totals>Group By, Iget:
ORG558 SITE1 PRO1
ORG558 SITE1 PRO2

So far so good, right? That is what I want.
Well, once I add in EXPIREDATE from the SERVICE table, I get this:
ORG558 SITE1 PRO1 4/30/2001
ORG558 SITE1 PRO1 9/30/2002
ORG558 SITE1 PRO2 4/30/2001
ORG558 SITE1 PRO2 9/30/2002

As you can see, it will list each PRODUCT with each other’s own maintenance figure, even with the Group BY active.
What I was looking for was:
ORG558 SITE1 PRO1 9/30/2002
ORG558 SITE1 PRO2 4/30/2001

So how can I get the above without the duplicates?

I hope I explained this correctly.

This discussion is locked

All Comments