Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting Duplicates Thoughout Multiple Tables 1

Status
Not open for further replies.

leadpro

Technical User
Jan 7, 2005
34
US
I have several tables because my record volume is well over 10 million records. I would like to dedup based on Homephone thoughout all of my databses. Any suggestions?

Leadpro
 
Create a saved union query reading all your tables.
Then create an aggregate query based on this union query grouped by homephone having count(*)>1.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Ah...a union query creates unique record set from all tables and I can pull from there..is this what you're saying?

 
No, not really.
My suggestion was to find the duplicates (with UNION ALL).
I've misread your post, sorry.
Create a table with the desired structure and and index not allowing duplicates on the relevant fields.
Then run an append query based on the union query.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hmmm...what if the result is millions of records? Will Access handle this in one results table?
 
The limitation is that the size of the db must be less than 2 Gb.
You may have many mdb playing with linked tables.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
OK, I'll play around with this, however, I suspect that once the appendage to the new table exceeds this, I will have a problem.

In other words, I create my union query to join 10 linked tables of data 20 gb and the result is a table 15 gb. Not sure what happens there unles there is a way to split this up?
 
No go.
Take a look at MSDE.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
how about this...can we only include the phone numbers...this would dedup all of the records. Export those phone numbers, then match them up with the respective records in each table...export those into multiple databases.

Question...what is the sql for finding matched records of another table?
 
SELECT your fields list
FROM Table1 INNER JOIN Table2 ON Table1.PhoneNum = Table2.PhoneNum

But, are all the phone numbers stored with the same format ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Almost there...

my phone number table is phoneonly with field HomePhone
table with fields including HomePhone field is HomeOwner

Please show me the INNER JOIN with this in mind.

Thanks so much!

LeadPro
 
all stored as text
In a consistent manner ?

SELECT A.*, B.*
FROM phoneonly A INNER JOIN HomeOwner ON A.HomePhone = B.HomePhone

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
hmm...consistent...sorted ascending in both tables...still picking up 2 records when they match. Just need unique full records in a query result that matches the phoneonly table.

LeadPro...thanks!
 
Just need unique full records
SELECT DISTINCT your fields list
FROM phoneonly A INNER JOIN HomeOwner ON A.HomePhone = B.HomePhone

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top