Ok, lets use an example. Lets say this is a contacts database. You have 2 tables; contacts and actions. Contacts is your list of people, Actions is the engagements you have with those people. So you run an Append query from your old table to Contacts:
INSERT INTO Contacts (ContactID, Firstname, Lastname, etc.)
SELECT ContactID, Firstname, Lastname, etc
FROM oldtable
Now you need to append the actions. so that query would look like this:
INSERT INTO Actions (ContactID, ActionDate, ContactBy, etc.)
SELECT ContactID, ActionDate, ContactBy, etc
FROM oldtable
The other scenario is if you are breaking out the data into lookup tables and your Foreign Keys are in the main table. So in that case, lstill using the Contacts example, you have your contacts table and a category table to indicate the type of contact. So now your Append query would look like this:
INSERT INTO Contacts (ContactID, Firstname, Lastname, CategoryID, etc.)
SELECT Contacts.ContactID, Contacts.Firstname, Contacts.Lastname, Category.CategoryID, etc.
FROM oldtable, Category INNER JOIN on oldtable.Category = Category.Category
You would have to create the Category table first:
INSERT INTO Category (Category) SELECT DISTINCT Category FROM oldtable
This is assuming you are using Autonumber PKs which will be generated during the Append.
Hope this helps,
Scott<>
Blog: http://scottgem.wordpress.com
Microsoft Access MVP since 2007
1 person found this reply helpful
·
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.