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

Merging two tables from two differents databases

Status
Not open for further replies.

laonei

Technical User
Feb 21, 2005
11
FR
I have two different databases, need to take data from A database (tablename: circuit) and put it to B database(tablename: circuit). Problem is that tables have not the same field. I did use the import menu but when I run B database, I got missing value.

Saw on the net that I can use inner join, but I have no idea how.

Hope it's kind of clear...
Sorry if this question has already been posted.
laonei
 
In db A link to the table in db B (File>GetExternalData).

Then create an append query using table Circuit in db A to add the data to the linked table (which will get the name 'circuit1' in db A).
You can specify in the query the target field for each source field.

If this is just a once off you can then delete Circuit1 from db A.

 
Thanks lupins46 for an answer.
I manage the first. Then...

Euh, how do I create an append query? Guess that's a stupid question huh?
 
Create a new query using the Circuit table.
Add all fields to the query rid.
From the Query menu choose Append Query. You will be asked for the table you want to append to; you choose Circuit1 for this.
You will then have to go through each column and make sure that the AppendTo row contains the correct field in Circuit1 that you want that column to append to.

Save the query.
Run the query.

BUT before you run the query make sure you have a backup of db B, in case anything goes wrong.

When you run the query, you should get message telling you that you will append x records. If there are any problems you will get further messages which may be very long but contain the information about what has gone wrong.






 
Hi lupins46,

I forgot to thank you for your help. It did work as you said.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top