The delete duplicates only works if the entire row is a duplicate. I have never found the commend of much use. I assume you have a unique row identifier that is different for each duplicated ponum
Make a temp table w/ ponum in it, and insert 1 row for each ponum w/ duplicated records. insert into temptable (ponum) select ponum from poheader group by ponum having count * > 1 Make a second temp table with 2 columns, ponum and rowid, and insert 1 row for every record in poheader where the ponum is in the temptable. Now go manually delete 1 row for each ponum in the second temp table for the record you want to keep. Now delete the rows using the second temp table. delete from poheader where rowid in (sel rowid from second_temp) Troy ---------- Original Message ----------- Using 6.5++ win 1.855 delete duplicates from poheader using ponum gives me: 0 rows deleted There are 21 duplicate rows Bernie Lis Megabytes, Inc. ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: INTRO rbase-l ================================================ TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: UNSUBSCRIBE rbase-l ================================================ TO SEARCH ARCHIVES: http://www.mail-archive.com/rbase-l%40sonetmail.com/
