Removing duplicate results from query

r3volver

New Member
Joined
Aug 4, 2006
Messages
4
Here's my code:

Code:
SELECT [FET].[Material], [FET].[Material_Description], [FET].[Product_hierarchy], [80KS].[Material], [80KS].[Material_Description], [80KS].[Product_hierarchy]
FROM FET, 80KS
WHERE [FET].[Product_hierarchy]=[80KS].[product_hierarchy];

The problem is, there can be tons of records in the 80KS query that have a Product_hierarchy matching up to the records in the FET query. And they will have a different Material and Material_Description. So they're not duplicates as far as Access is concerned.

I only want one 80KS record matching up to an FET record. I don't care which one. How do I do it?

Any help you can toss my way is appreciated.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

giacomo

Well-known Member
Joined
Feb 20, 2002
Messages
1,796
do a totals query and choose FIRST or LAST for your 80KS fields

hth,
Giacomo
 

Forum statistics

Threads
1,141,756
Messages
5,708,329
Members
421,565
Latest member
Lastadiego

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top