SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Other Forums
 MS Access
 Need DELETE Duplicates Query
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sqlslick
Yak Posting Veteran

83 Posts

Posted - 04/12/2013 :  14:13:48  Show Profile  Reply with Quote
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

USA
5072 Posts

Posted - 04/12/2013 :  15:57:18  Show Profile  Visit russell's Homepage  Reply with Quote
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 - 04/15/2013 :  13:59:49  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.14 seconds. Powered By: Snitz Forums 2000