Keep only one of each?

  • Thread starter Thread starter dan
  • Start date Start date
D

dan

Hi, I have a table named 'tech' in Access like this:

SRC_Num Change_Num
100 31839
100 31839
762 32884
762 32884
110 42445
36 44313
36 44313
36 44313

I want to keep only one row for Change_Num. The end result should be:

SRC_Num Change_Num
100 31839
762 32884
110 42445
36 44313

The unique value here is Change_Num. I want to keep only one of each of
these.

Thank you!!!
 
Crete a make table query:
ELECT DISTINCT tech.RC_Num, tech.Change_Num INTO tech1
FROM tech;
Run it then delete tech table and rename tech1 to tech.
This applies only if there are only the two fields that you show.
 
OOps! I left the S off of SELECT in the query. Query should be:
SELECT DISTINCT tech.RC_Num, tech.Change_Num INTO tech1
FROM tech;
Sorry
Crete a make table query:
ELECT DISTINCT tech.RC_Num, tech.Change_Num INTO tech1
FROM tech;
Run it then delete tech table and rename tech1 to tech.
This applies only if there are only the two fields that you show.
Hi, I have a table named 'tech' in Access like this:
[quoted text clipped - 20 lines]
Thank you!!!
 
This sounds like a fundamental flaw in your access table design.

Try making your primary Key 'SRC_Num Change_Num' and ensuring the Indexing
is set to 'Yes - No Duplicates'.

Another easy way to get just one example of each is to write a query and use
grouping to only show one example of each number.

Hope that helps,

John
 

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

Back
Top