How do I rename a table? (1 Viewer)

Ron7341

New member
Local time
Today, 09:13
Joined
Apr 1, 2016
Messages
2
I have a two part question. I've just discovered I've wound up with three tables named the same but located in different areas of my hard drive. First can you tell me how to rename each one to a unique name, then take the data from each and blend it into one table so I can delete the duplicate data. Could you please give me some advice as to the simplest ways to go about this?

Thanks very much. Over time I've just been careless and let this happen, won't happen again. Ron:eek:
 

GinaWhipp

AWF VIP
Local time
Today, 09:13
Joined
Jun 21, 2011
Messages
5,901
Sounds like you meant to say three databases with the same table located in different places with the same name. That said, the only thing that comes to mind is... Create a fourth database and a table within and link to the other three. Append them all to the newly created table within the database. At that pint if there is some unique field you could use a Find Duplicates query to parse out the duplicates. Hmm, that might require a check box so you can identify and then filter out for deletion.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 09:13
Joined
May 21, 2018
Messages
8,463
There is no reason to append the duplicates then go look for them and then delete them. Unless you have duplicates within each table. If there are no duplicates within one of the tables. If you index one field or create a composite index on more than one field an append will not import the duplicates. So likely the unique field in the three tables is a autonumber, which will not be of use since two duplicates will have different autonumbers. Is there another field or combination of fields that uniquely identify a record? In other words if you were going to look for a dupe what fields would you use? That would be the index or composite index.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:13
Joined
Feb 19, 2002
Messages
42,970
You don't need to rename anything.

Start with a new, blank database. Create a table to hold the merged data. Define a primary key that will ensure uniqueness. Then link to each of the databases, one at a time and use an append query to take data from each table and append it to the new table.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 08:13
Joined
Feb 28, 2001
Messages
26,998
The only issue you might have, and nobody asked this question that I can see...

Did your databases that had these unfortunate name conflicts happen to have child tables linked to the name-conflict tables by PK/FK linkage? (I.e. formal declared relationships)?

If not, then the merge being described will work fine. If NOT then you have to consider a multi-step process. I won't confuse you unless you tell us you need it.
 

Users who are viewing this thread

Top Bottom