troubleshooting Question

SQL Query - Duplicate process

Avatar of Kristen Jones
Kristen JonesFlag for United States of America asked on
Microsoft AccessSQL
12 Comments1 Solution331 ViewsLast Modified:
I have the following ADDRESS-EXPORT  table structure in An Access 2010 Database

PID (text max 14 digits)
TAXFULLNAME
TAXADDRESS1
TAXADDRESS2
ADDRESSCOMBINE
PIDS (empty text field)

I have 1000's of records that share the same ADDRESSCOMBINE data (Duplicate) but each has a different PID.  The ADDRESSCOMBINE is just TAXADDRESS1 and TAXADDRESS2 combined. What I need to do is create a query that identifies all of the duplicate records of this table and either appends or creates a new table that Copies over the TAXFULLNAME, TAXADDRESS1, TAXADDRESS2 and ADDRESSCOMBINE and a new field called PIDS where all of the PID that have the same ADDRESSCOMBINE field are entered in the new PIDS field, even if there is no duplicates it would just populate the PIDS with one PID

Example Record:

PID                 FULLNAME  ADDRESS1  ADDRESS2                           ADDCOMB  
1111111111  (JOHN SMITH)   (123 ANY ST) (ANYCITY, XX 12345)    (the same address)
2222222222  (JOHN SMITH)   (123 ANY ST) (ANYCITY, XX 12345)    (the same address)
3333333333  (JOHN SMITH)   (123 ANY ST) (ANYCITY, XX 12345)    (the same address)
4444444444  (JANE  SMITH)   (555 ANY ST) (123CITY, XX 55555)    (the same address)
5555555555  (JANE  SMITH)   (555 ANY ST) (123CITY, XX 55555)    (the same address)
6666666666  (TOM  JONES)    (777ANY ST) (444CITY, XX 99999)    (the same address)

NEW TABLE

 FULLNAME    ADDRESS1     ADDRESS2                           ADDCOMB         PIDS
(JOHN SMITH)   (123 ANY ST) (ANYCITY, XX 12345)    (the same address)  1111111111, 2222222222, 33333333

 (JANE  SMITH)   (555 ANY ST) (123CITY, XX 55555)    (the same address)     4444444444,  5555555555  

 (TOM  JONES)    (777ANY ST) (444CITY, XX 99999)    (the same address) 6666666666  

Is this possible??????
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 12 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros