PDA

View Full Version : microsoft access problem



ElastoManiac
12-02-2005, 02:04 PM
So this is a very basic question, listen up:
I have only one table in my database. The table contains several text fields ( about 8 ).
The table is filled with very very much data. The problem is that i have a multiple
instances of the same data ( i mean apsolutly same, all the fields are same ) so
i need to delete copies.
Help please. Those copies are making me mad :mad:

Govtcheez
12-02-2005, 02:17 PM
Here's something similar I did for a table of mine that had a bunch of drawings in it. There's a wizard for this in there, too (which is where this was generated from)

SELECT Drawings.Dwg_Num, Drawings.Station, Drawings.Title
FROM Drawings
WHERE (((Drawings.Dwg_Num) In (SELECT [Dwg_Num] FROM [Drawings] As Tmp GROUP BY [Dwg_Num] HAVING Count(*)>1 )))
ORDER BY Drawings.Dwg_Num;

ElastoManiac
12-02-2005, 02:22 PM
Is this some kind of VB macro, 'cause i don't know VB neither do macros.
How to use wizard?

ober
12-02-2005, 02:37 PM
That's SQL. Open a query and go to SQL view by right clicking on the form.

The "Duplicates" wizard should be in one of your menus.

SlyMaelstrom
12-02-2005, 02:39 PM
If you don't know SQL, it's pretty tough to get too far in MS Access. Access's help section has some info about it, but it's very, very bad. Search online for a tutorial.

ElastoManiac
12-02-2005, 02:41 PM
This is not a complicated database, it's a single table for god's sake, why should i learn SQL?

SlyMaelstrom
12-02-2005, 02:43 PM
Oh I didn't know you were just gonna keel over and give up on life after this database. I just thought you might want some information for the future.

Nevermind, though. Don't mind me.

ElastoManiac
12-02-2005, 02:47 PM
That's SQL. Open a query and go to SQL view by right clicking on the form.

The "Duplicates" wizard should be in one of your menus.
I have done everything you'v told, except the last thing, i can't find the wizard in any menu.
Does it matters if my Access is a bit old ( 2000 version )

ElastoManiac
12-02-2005, 02:49 PM
Oh I didn't know you were just gonna keel over and give up on life after this database. I just thought you might want some information for the future.

Nevermind, though. Don't mind me.
sorry for that :(

PJYelton
12-02-2005, 03:08 PM
The find duplicates query only finds duplicates, it doesn't delete them. Unfortunately there isn't an easy way to get rid of them that I know of unless you know SQL.

What I usually do is copy the table, then paste but only paste the structure (it should ask). Then in this new table set the fewest amount as columns that you can as the primary keys but that will not completely delete unique rows. Let me know if this is confusing and I'll clarify. Then simply append the original table to this new table, it'll say something like appending XXX items but could not append YYY items due to key constraints. Click OK and your new table shouldn't have any duplicates.

ElastoManiac
12-02-2005, 03:14 PM
Ok, heres what i will do. Since i obviosly don't know how to do this, could someone remove the duplicates for me?
Just give me your e-mail, and send back the database with no duplicates.
i'l send the database with duplicates - the database is about 1,2 MB
// this is not rule breaking since this doesn't have to do anything with programming...

anonytmouse
12-02-2005, 04:16 PM
You could try this. I'm sure you can figure out how to execute an SQL statement.


SELECT DISTINCT * INTO [NewTableName] FROM [OldTableName]

ElastoManiac
12-03-2005, 01:28 AM
I have found the wizard!!!
No need to help anymore...
But i really wish to learn SQL, so if anyone has a link to tutorial of somekind...

ober
12-05-2005, 07:42 AM
search google... you'll find literally thousands of tutorials.