Duplicated Items to Unique (1 Viewer)

rickyfong

Registered User.
Local time
Yesterday, 18:53
Joined
Nov 25, 2010
Messages
199
I got a long EXCEL file with many same items name, such as follows:

Orange 3
Apple 4
Orange 5
Orange 6
Apple 6
Orange 4

Just want to know is there any way just to have unique item in an Access File after I import that Excel file to Access.

In the file, I just need the following 2 records!

Apple
Orange

Any idea?? Thanks a lot!!
 

StevePupel

New member
Local time
Yesterday, 21:53
Joined
Nov 13, 2007
Messages
8
Yes, easy. Import the data, or even link to it. Then create a query over the table and click on the summary button to make it a summary query. Specify the Column which holds the fruit name as the group by column. Make sure no other columns have group by specified. You can simply remove the other columns or specify an aggregate function (count, sum, min, max whatever).
 

rickyfong

Registered User.
Local time
Yesterday, 18:53
Joined
Nov 25, 2010
Messages
199
Thanks! But my idea is to save the items in a file but not using query to have summary query result!!
 

Minty

AWF VIP
Local time
Today, 02:53
Joined
Jul 26, 2013
Messages
10,371
I'm not sure what you mean - if the result you want really is simply;

Apple
Orange

Then only bring that field into the grouped query. If you want

Apple 12
Orange 17

Then add the qty field and Sum() it. Exactly as Steve suggested.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 02:53
Joined
Feb 19, 2013
Messages
16,618
if you are saying you want to find the unique names in your excel data, use

SELECT DISTINCT

so import or link to the data as previously suggested and you can adapt a query like this

SELECT DISTINCT FruitName FROM excelTable

to append or maketable as required
 

Users who are viewing this thread

Top Bottom