Moving Table between DB's

  • Thread starter Thread starter RogerJ
  • Start date Start date
R

RogerJ

I accidently deleted the entire contents of a table. I have a backup of the
database but it is to old to just restore. However the table in question is
okay.

How do I export that table from the backup and import it to the main database?

I have found the table export facility, but I am not sure that to do from
there, I.E. it seems to want to export to an existing database?????

Thanks
Roger
 
I've always done this operation from the other side, by importing to the db
where you want the table to live. Open the good db and then import the table
with its data from the backup copy.
 
Roger:

Provided you still have the empty original table in your database rather
than importing the backup table you can create a link to it (File | Get
External Data | Link Tables on the main database menu bar, or the 2007
equivalent). This will create a linked table under a new name (adding a
numeric suffix to the original name).

Next compact and repair the database; this might not be necessary if no
conflicts exist between values which previously existed in an autonumber
column in the original table and the backup, but it dos no harm even if not
essential.

Finally create an append query to append all rows from the linked backup
table to the empty original table, making sure you include all columns by
selecting the asterisk rather than individual columns. The delete the
linked table; only the link will be deleted, not the backup table itself.

The advantage of this is that any relationships with other tables in your
database will be preserved, whereas deleting the empty original table and
then importing the backup as a new one would mean you'd have to recreate any
relationships.

Ken Sheridan
Stafford, England
 
Thanks, Do I need to remove the table first or will it replace or add to or
rename the empty one???

Rogerj
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top