Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Appending records related tables - XML

Status
Not open for further replies.

Pampers

Technical User
Apr 7, 2004
1,300
AN
Hi everyone,
Importing data/table through xml is really easy. But now I want to append data of two related tables, tblMedicine and tblMedicineDetail both with autonumber ID's (Long Integer, incremental), to another database with also tblMedicine and tblMedicineDetail. Of course, errors occur because of duplicate values of the ID's. I use Get External Data, XML, Append Data to Excisting Table(s).

Question: how to go about this problem. How do you append data of related tables when you have long integer incremental autonumbered ID's? Would you append both tables seperate, and then 'manually' higher the ID's of the related table?



Pampers [afro]
Keeping it simple can be complicated
 
Thinking out loud ... how about appending a calculated number?

[tt]INSERT INTO tblMedicine ( ID )
SELECT ([ID]*100)
FROM tblImport;[/tt]
 
That might be an idea. Tnx Remou.

Pampers [afro]
Keeping it simple can be complicated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top