query to add records from one table to another

Y

yola

Hi All,

I am new to ACCESS.

I need to know the best way to add records from one table into another table
(same database).

For example,

Table1
Field = Fruits

Table 2
Field = Fruits for sale
1. apples
2. pears
3. plums
4. oranges

How do I move the data from table2 over to table1 in the Fruits field?
A sample query would be much appreciated.

Thank you very much for your help!
Yola
 
J

John Vinson

Hi All,

I am new to ACCESS.

I need to know the best way to add records from one table into another table
(same database).

For example,

Table1
Field = Fruits

Table 2
Field = Fruits for sale
1. apples
2. pears
3. plums
4. oranges

How do I move the data from table2 over to table1 in the Fruits field?
A sample query would be much appreciated.

The short answer is "An Append query".

The longer answer is "Why would you want to store the same data in two
different tables in the first place?" You probably DON'T want to do
so!

What are you *actually* trying to do? What real life Entity is
represented by Table 2? What other information about Table1's Entity
does "Fruits For Sale" contain?

John W. Vinson[MVP]
 
Y

yola

Thank you all.

John,

The records to be added to Table1, exist in another table ie. "Table2". The
fields in the main table are empty, and I would like to have the records from
"Table2" added to these "empty fields" in Table1.

Thanks,
Yolanda
 
J

John Vinson

Thank you all.

John,

The records to be added to Table1, exist in another table ie. "Table2". The
fields in the main table are empty, and I would like to have the records from
"Table2" added to these "empty fields" in Table1.

Thanks,
Yolanda

This is still confusing.

If you want to copy records from Table2 into new records in Table1,
adding to the total number of records in Table1, then use an Append
query.

If you want to take existing records (which have NULL values in some
fields) in Table1 and fill in those blank fields with values from
Table2, then you do NOT want an Append query but rather an Update
query. You'll need to join Table1 to Table2 on some unique indexed
field and update the Table1 field to

=[Table2].[fieldname]

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