|
-
Nov 28th, 2000, 07:58 AM
#1
Thread Starter
Member
I have a database with about 70000 entries. Lots of them are double and I would like to clean the db from these doubles.
Now, does someone know how to check for double entries in an Access database and how to remove one of them?
Life is trip, eat it and smile.
-
Nov 28th, 2000, 08:07 AM
#2
Junior Member
WIZARD
In Access, you can use the "Wizard double records" to create a query which will show you the double records. Very easy AND very effective !
-
Nov 28th, 2000, 08:14 AM
#3
Thread Starter
Member
Nope
I tried this wizard, but he just gave me as a result how many doubles of which record are in the db....
Life is trip, eat it and smile.
-
Nov 28th, 2000, 08:29 AM
#4
Fanatic Member
Are you after completely duplicated records or duplicated fields?
Use SQL with a Group By clause and the Count function to identify duplicates.
Cheers,
P.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Nov 28th, 2000, 08:48 AM
#5
Thread Starter
Member
Records
I am looking for duplicate records and I would like to do it over VB, but if you know an easier way.....post it.
Thanks
Life is trip, eat it and smile.
-
Nov 28th, 2000, 10:13 AM
#6
Fanatic Member
Do you know SQL at all?
the form would be of:
SELECT (fields), Count(LastField) As DupCount
FROM Table
GROUP BY (fields)
WHERE DupCount > 1
This would give you duplicate records. I have always done this in code and marked only subsequent duplicated records with a flag and then used that flag in a DELETE SQL query.
Break it down into small steps.
OK?
Paul.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Nov 28th, 2000, 10:14 AM
#7
Junior Member
WIZARD
The wizard works fine with me !!
Using the wizard, you have to select the fields used to determine which records are double or not. After finishing the query, Access shows the double records.
The equivalent SQL of an example I used :
SELECT DISTINCTROW [lidnr], [naam], [voornaam]
FROM AlleDeelnemers
WHERE [lidnr] In (SELECT [lidnr] FROM [AlleDeelnemers] As Tmp GROUP BY [lidnr] HAVING Count(*)>1 )
ORDER BY [lidnr];
-
Nov 28th, 2000, 10:23 AM
#8
Thread Starter
Member
:-)
No, I don't know SQL! Still learning.
But thanks for the post. I will try my best.
Cheers
Life is trip, eat it and smile.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|