Need to export one table to another table

RonW7341

Registered User.
Local time
Today, 05:46
Joined
Aug 16, 2011
Messages
18
I have two tables of different structures. Both have sys=autoincrement as a unique record identifier. What is the best way to blend the two tables into one? Should I change the field structure of each table so that they match up for a file export and import and if so how do I handle the fact that each table currently has it's own record identifier number.? Thank you very much for your help. ron
 
assuming your autonumber fields are duplicated in each table (i.e. both start from 1) you have a number of choices. If the ID field is being used for what it is intended - a field identifier, then it shouldn't matter, just append one table to the other. Note if the ID field is referenced by other tables (perfectly legitimate) then you would need to update the other tables with the new ID

Alternatively, create a new table with two additional fields - an 'oldID' field and an 'oldtableID' field to identify where the data came from. Once you have sorted out any issues with the combined data these fields can be deleted.

As to which is the best way - it depends on your existing structure

Dang: beaten by Unc
 
Thanks to both you guys for responding so quickly. Thinking through what you've sent me raises another question. If each table has the same numbering pattern, 1-270 as an example. Is there a way to go in and have the autoincrement change one of the tables to begin at 600-870 as an example and leave the other one as is. That way the blending of the two should not be a problem since they are now unique. After the blending occurs, do the same thing again and number the entire new table with 1-540 for example? Is that possible and if so can you give me the steps? Thanks a bunch. ron
 
It is not possible on an autonumber field as such but if you were to create a copy of the table structure, the autonumbers will start from 1 again so append the first table and then the second.

Alternatively revisit my second paragraph
 

Users who are viewing this thread

Back
Top Bottom