Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / February 2005

Tip: Looking for answers? Try searching our database.

A very specific problem involving duplicates

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
johnhutch@gmail.com - 08 Feb 2005 15:00 GMT
Our company has just merged with another and as a result we've merged
our customer databases. The data was stored in each database slightly
different so there were some issues with the merge. Namely, one person
may be listed several times under different addresses or slightly
different spellings of the same address or a new surname etc etc.

My goal is to, without actually making any hard deletions to the
original tables,  create a query that will display all our customers,
identified and sorted by their social security number, and listing them
only once. The SSN is *not* a primary key field in any of the source
tables, but it is the best way I can think of to make sure every
customer in the resulting query is unique.

It seems like this should be as easy as putting some kind of Unique
modifier on the SSN record, but I'm not seeing anything of the sort.
Can anyone lend some assistance? Note that I am using Access 2000.

Thanks!

John Hutchinson
johnhutch@gmail.com
Rog - 08 Feb 2005 15:21 GMT
SSN may not be a key in your existing table, but you can make the
record key of a new table that has the same layout (copy structure
only, then make SSN the key).  Then use append queries to add records
from both tables.  Only those records with unique SSNs will be added to
the new table.
johnhutch@gmail.com - 08 Feb 2005 15:49 GMT
unfortunately, I don't believe this is an option for two reasons:

1.) It will eliminate customers completely, as opposed to just
eliminating extra rows. If there are 6 rows concerning a Mr. John Doe
with a SSN of 111-11-1111, the end result should give me one row. Any
of the six rows will do.

2.) I don't believe creating a new table is an option, though I could
be wrong. This query needs to be a one-click solution run on a daily
feed of data (it will eventually be used to spit out a nicely formatted
report for laymen users). I wouldn't building a new table create an
extra step in the process every day for whomever wanted to view the
final report?
Rog - 08 Feb 2005 16:06 GMT
It will not eliminate customers completely, since it will append 1
record for each SSN.

But I was assuming you wanted to get rid of double records; if you want
to keep all your records but display only one for each person you could
create a query, select SSN and any other field you want to see, and
make it a "totals" query.  Under SSN in the totals field, select
"First", and under the other fields select "Group by".
johnhutch@gmail.com - 08 Feb 2005 16:27 GMT
This *almost* worked. It definitely cut down on the number of results I
got, however, there are still some duplicates in the cases where one
customer has two different addresses listed, or one record has a
birthdate and the other does not. Am I stuck?
Rog - 08 Feb 2005 16:45 GMT
OK, sorry, do it the other way 'round.
Group by SSN, and ask for "First" of the other fields you need to see.
I tried it out, it works for me!
johnhutch@gmail.com - 08 Feb 2005 18:44 GMT
yes, it worked! thank you!
Rog - 08 Feb 2005 19:59 GMT
> yes, it worked! thank you!

Yay!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.