Michhost,
Another way that I have doen this is the past, and is very effective with "Single" field "Dups", is to do the following, which will work, even if you have several records in a row that are "Duplicate" It does however, require that you have an index on that field, or a compound index that at least starts with that field. In this example, I'll try to remove duplicate customer entries from a CUST table:
SELECT CUST
SET ORDER TO CUSTID
GO TOP
M.CUSTID = CUST.CUSTID
SKIP
DO WHILE NOT EOF()
IF CUST.CUSTID = M.CUSTID
DELETE
ENDIF
M.CUSTID = CUST.CUSTID
SKIP
ENDDO
This is handy, because it has all "CUSTID"'s in order. You simply save the "Previous" one to a memory variable, skip to the next record, and then compair it. This is very clever, works in all kinds of situations, and can be compound. The only hitch is you must have an index that at least matches the leading part of your expression. You can also use it for something like:
M.CHECKDUP = CUSTID+CUSTFNAME+CUSTLNAME
IF CUSTID+CUSTFNAME+CUSTLNAME = M.CHECKDUP
DELETE
ENDIF
If you want to use compound expressions.
Thanks,
-Scott
Please let me know if this has helped! s-)