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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

import to table query

Status
Not open for further replies.

loneranger27

Programmer
Apr 22, 2003
94
0
0
US
Hi,

I have a query that finds customer info from the customer table then exports that infor to an excel file then finds all of the different accounts that person has and makes another excel file and then finds all of the orders per account and makes a third excel file. All is fine to here.
I now need to be able to import these files into someone elses database. I can put the customer info in and when I do my query assigns a new cutomer id because I cant have any duplicates. This Customer id is the foreign field that links the accounts to the customer, now this field has changed and I am not sure how to make the change in the second table import to change the forein key to the new key and still keep everything in sync. Does any one have any ideas that might help. I would appreciate it greatly

thanks
 
Let me explain a little more.

This is a local database on each users laptop. They need the ability from time to time to take all the information for a customer write it to a file and then email the files to a co-worker to import into their database so they can work with the actual file. The biggest problem is that since each person builds his own database the files that are exported have primary keys that may match a primary key on the importing laptop which causes problems in working with the data. I hope this helps some.

Thanks
 
You should probably look into replication instead of trying to sycronize everything yourself. I haven't had to deal with this kind of situation, so that's the best I can offer.

Hope you figure something out,

Leslie
 
i came up with a solution it may not be the best but it works just the same, I used a multiplier on the foreign key to make them all stay the same.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top