Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Need DELETE Duplicates Query

Author  Topic 

sqlslick
Yak Posting Veteran

83 Posts

Posted - 2013-04-12 : 14:13:48
Hello all,

I need to write a DELETE query that will remove duplicate records from a table named PATIENTS. Some sample data is below:

LAST_NAME, FIRST_NAME, DOB, SEX, HCN
DOE, JOHN, 1965/11/11, M, 1234567809
SMITH, JANE, 1953/12/16, F, 9087654321
DOE, JOHN, 1965/11/11, M, 1234567809

I know how to simply SELECT and identify the duplicate records but how do I remove them using a single query? The table consists only of the 5 columns specified above.

Thanks in advanced!
J

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2013-04-12 : 15:57:18
Check out these two articles. Or just google "dedupe in msaccess"

http://support.microsoft.com/kb/209183

http://www.dbforums.com/microsoft-access/1634000-how-translate-row_number-ms-access.html
Go to Top of Page

sqlslick
Yak Posting Veteran

83 Posts

Posted - 2013-04-15 : 13:59:49
Hi Russell,

Thanks for the info, but I know how to do this in a 2 step process. I was wondering if anyone knew how to do this using a single query?

Thanks,
J
Go to Top of Page
   

- Advertisement -