PDA

View Full Version : Help with a duplicates Query?



lifeson
01-15-2009, 09:13 AM
Hi folks
I need help with a query which is driving me mental :doh: :doh:

I have a table called discount interdependence (TblDiscountInterdependence)
It contains the following fields:

DiscountParentID
DiscountChildID
ActiveFlag

It shows what subsequent discounts would be allowed when you select the Parent Discount in this example JV is the ParentDiscountID:

SELECT TblDiscountInterdependence.DiscountParentID, TblDiscountInterdependence.DiscountChildID, TblDiscountInterdependence.ActiveFlag
FROM TblDiscountInterdependence
WHERE (((TblDiscountInterdependence.DiscountParentID)="JV") AND ((TblDiscountInterdependence.ActiveFlag)=True));


If I was to choose one of the child discounts (example "B5") that the qry returns I need a qry that shows only the child discounts that are childs of both JV and B5

Hope that makes sense :bug:

orange
01-16-2009, 05:51 AM
Hi folks
I need help with a query which is driving me mental :doh: :doh:

I have a table called discount interdependence (TblDiscountInterdependence)
It contains the following fields:

DiscountParentID
DiscountChildID
ActiveFlag

It shows what subsequent discounts would be allowed when you select the Parent Discount in this example JV is the ParentDiscountID:

SELECT TblDiscountInterdependence.DiscountParentID, TblDiscountInterdependence.DiscountChildID, TblDiscountInterdependence.ActiveFlag
FROM TblDiscountInterdependence
WHERE (((TblDiscountInterdependence.DiscountParentID)="JV") AND ((TblDiscountInterdependence.ActiveFlag)=True));


If I was to choose one of the child discounts (example "B5") that the qry returns I need a qry that shows only the child discounts that are childs of both JV and B5

Hope that makes sense :bug:


Can you tell us in plain English what you are trying to do? Also provide some sample data, and a clear description of the problem you are encountering.

THe title of your post suggests an issue with duplicates, but your text does not.