How do I get rid of duplicate data?

G

Guest

I have data from a large spreadsheet and inherently, sections of the data are
duplicated to fulfill requirements in the spreadsheet (like names, projects,
etc.) which I am not using in this query.
I have already created a query to narrow the data into only week number,
month number, financial quarter, and the starting and ending dates for the
week.
What I need to do is eliminate all but one copy of each week and the
proceeding columns in that row. Is there a way to do this quickly as I have
around 50 duplicates for each week?
Thanks.
 
J

John W. Vinson

I have data from a large spreadsheet and inherently, sections of the data are
duplicated to fulfill requirements in the spreadsheet (like names, projects,
etc.) which I am not using in this query.
I have already created a query to narrow the data into only week number,
month number, financial quarter, and the starting and ending dates for the
week.
What I need to do is eliminate all but one copy of each week and the
proceeding columns in that row. Is there a way to do this quickly as I have
around 50 duplicates for each week?
Thanks.

Since you chose not to post any details of the tables, all I can suggest is:

- create a properly normalized set of tables in your Access database, and
instead of importing the spreadsheet, link to it; then run appropriate Append
queries and Update queries to migrate the spreadsheet data into the tables

- Make use of the DISTINCT (also known as Unique Values) property of your
queries. This can be done in select queries directly on the spreadsheet, in
the append queries, and in the recordsource of reports.

- Put a unique Index on the week number field (in your Access Weeks table) and
append the data from the spreadsheet; the first record encountered for a week
would be loaded and all other records for that week (even if they have
different data that you might actually want...!!!) will be discarded.

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top