S
subs
SELECT X.*
FROM PPG AS X INNER JOIN PPG AS Y ON (X.BL<>Y.BL) AND
(X.Ship_Date=Y.Ship_Date) AND (X.Consignee=Y.Consignee) AND
(X.Ozip=Y.Ozip) AND (X.Dzip=Y.Dzip);
This query will group records which has same ozip,dzip,shipdate but
different bl. But i want to filter andsee only those groups which has
atleast one zip from two sets of ozips.
Two sets of ozips are
07034,450089
1245,4568
For example the group should have either 07034 or 450089 from the
first set AND either 1245 or 4568 from the second set. I donot want
to see those groups of records which have ozips from one set only.
What would be the query/ Pls help Thanks
FROM PPG AS X INNER JOIN PPG AS Y ON (X.BL<>Y.BL) AND
(X.Ship_Date=Y.Ship_Date) AND (X.Consignee=Y.Consignee) AND
(X.Ozip=Y.Ozip) AND (X.Dzip=Y.Dzip);
This query will group records which has same ozip,dzip,shipdate but
different bl. But i want to filter andsee only those groups which has
atleast one zip from two sets of ozips.
Two sets of ozips are
07034,450089
1245,4568
For example the group should have either 07034 or 450089 from the
first set AND either 1245 or 4568 from the second set. I donot want
to see those groups of records which have ozips from one set only.
What would be the query/ Pls help Thanks