[AccessD] delete duplicates

Gustav Brock gustav at cactus.dk
Thu Sep 11 05:24:06 CDT 2003


Hi Pedro

> Thanks for the answer.
> But when i use your expression i get an erro that i can't seem to solve.
> What am i doing wrong.

> Pedro

> DELETE [test.FieldA]
>     FROM test
>     WHERE Not In (Select FirstOfPK from Query1);


You need to use the full syntax of a "normal" delete query. Something
like:

  DELETE *
  FROM test
  WHERE test.PK Not In (Select FirstOfPK from Query1);

Remember to run this first on some sample data and/or save a decent
backup of your database!

/gustav

>> Yes, look up the archive on
>>
>>   Eliminating duplicate rows
>>
>> for June this year.



More information about the AccessD mailing list