Help Please - Copying Records from one table to another

D

deaconj999

Hi All,

I have 2 similar databases the table1 in each is slightly different
with the addition of extra colums.

let me explain,

Database 1 (db1) is older than Database 2 (db2) and therefore Table1
in db1 has the original set of columns in it lets say a b c d e f .
Now db2 being a more updated version has columns a b c d e f g h i &
finally j in it. for example.

I know how to import the older, a thru f columned table1 from db1 into
db2 and replace the table 1 in db2.

But, I don't want to do this, I really need to import the columns a
thru f and the records within from db1 Table 1 straight into db2
Table1, basically using them to overwrite db2's table 1 columns a thru
f and having them sit alongside the g h i j in bd2 table1 already.

I am a novice self taught so please be kind in your explanation.

Many thanks in advance

Joe Deacon
 
J

John W. Vinson

Hi All,

I have 2 similar databases the table1 in each is slightly different
with the addition of extra colums.

let me explain,

Database 1 (db1) is older than Database 2 (db2) and therefore Table1
in db1 has the original set of columns in it lets say a b c d e f .
Now db2 being a more updated version has columns a b c d e f g h i &
finally j in it. for example.

I know how to import the older, a thru f columned table1 from db1 into
db2 and replace the table 1 in db2.

But, I don't want to do this, I really need to import the columns a
thru f and the records within from db1 Table 1 straight into db2
Table1, basically using them to overwrite db2's table 1 columns a thru
f and having them sit alongside the g h i j in bd2 table1 already.

I am a novice self taught so please be kind in your explanation.

Many thanks in advance

Joe Deacon

How can you determine *WHICH* record in db2.Table1 should be overwritten by a
record from db1.Table1? Are you assuming that the tables are in the same
order? If so you may be in real trouble: tables HAVE no meainingful order.

What's the actual content of these tables, if it's not confidential? Could you
give an example of a couple or three records from each table and indicate just
how the result should look?

John W. Vinson [MVP]
 
D

deaconj999

How can you determine *WHICH* record in db2.Table1 should be overwritten by a
record from db1.Table1? Are you assuming that the tables are in the same
order? If so you may be in real trouble: tables HAVE no meainingful order.

What's the actual content of these tables, if it's not confidential? Could you
give an example of a couple or three records from each table and indicate just
how the result should look?

John W. Vinson [MVP]- Hide quoted text -

- Show quoted text -

Hi John,

The table1 in db2 has no records in it at all just column headings,
all I need to do really I suppose is to import the columns from table
1 with the records, this will be like i said columns a - f leaving the
newly added ghij blank fo rthe user to fill in. You see my original
db1 has records in it (inputted by the user) I am trying then to put
their records in the new db2 which was only written to add new
columns.

I am not worried about overwriting any records in bd2 cos the user
hasn't seen it yet and therefore has not put any records in it.

As Rick Brandt said link the tables which I have done but I don't know
how to create the update query !!!!!!

Joe
 
J

John W. Vinson

The table1 in db2 has no records in it at all just column headings,
all I need to do really I suppose is to import the columns from table
1 with the records, this will be like i said columns a - f leaving the
newly added ghij blank fo rthe user to fill in.

Ah! Then it's much simpler. From your description it sounded like you already
HAD data (records) in db2.

Since you don't:

1. Open db2
2. Use File... Get External Data... Link on the menu to link to the table in
db1
3. Create a new Query based on the linked table from db1
4. Change the query to an Append query using the Query menu option, or the
query type tool in the toolbar
5. Select the desired target table in db2
6. Select the fields a-f (all of the fields), and make sure that the "Append
To" row shows the correct corresponding field
7. Run the query by clicking the ! icon

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top