loop through records delete values that are equal

L

Linda

I have a list of about 200,000 words (1 word per record) many of which are
the same. Is there a way to loop through all of the records and delete any
records that are duplicates?
 
J

John Nurick

Hi Linda,

For a one-off I feel it's simpler to create a new table with the same
structure and then use an update query that only adds unique records,
like this

INSERT INTO tblNew ( TheWord )
SELECT DISTINCT tblOld.TheWord
FROM tlbOld;

Then delete the old table and rename the new one to the name you need.
 

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