Re: loop through records delete values that are equal

From: John Nurick (j.mapSoN.nurick_at_dial.pipex.com)
Date: 10/26/04


Date: Tue, 26 Oct 2004 22:18:49 +0100

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.

On Tue, 26 Oct 2004 07:55:03 -0700, "Linda"
<Linda@discussions.microsoft.com> wrote:

>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?

--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.


Relevant Pages

  • Re: Modifing Cells- Increasing numbers in a table
    ... Just use an update query. ... John Nurick [Microsoft Access MVP] ... Please respond in the newgroup and not by email. ...
    (microsoft.public.access.externaldata)
  • Re: Date conversion
    ... Either way you need to add a date-time field and use an update query. ... >>by using the Format property of the field or textboxes. ... >>Please respond in the newgroup and not by email. ... John Nurick [Microsoft Access MVP] ...
    (microsoft.public.access.conversion)
  • Re: Merging existing table values
    ... You need to use an update query for this, with a join between the tables ... so that the records in one table line up with their counterparts in the ... John Nurick [Microsoft Access MVP] ... Please respond in the newgroup and not by email. ...
    (microsoft.public.access.externaldata)
  • Re: Text File - Capturing import Date/Time
    ... I assume you have a date/time field in the tables ... create an update query that updates DateImported to ... John Nurick [Microsoft Access MVP] ... Please respond in the newgroup and not by email. ...
    (microsoft.public.access.externaldata)
  • Re: Update with summary
    ... UPDATE tblPO INNER JOIN qrySummarizePODollarAmtImport ON ... Doug Steele, Microsoft Access MVP ... create an update query that posted the dollars to the PO table, ...
    (microsoft.public.access.forms)