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

Update and Append date from one table to another

Status
Not open for further replies.
Sep 29, 2002
524
0
0
US
I have table1, table2, table3 and table4. Table 1 through 3 are linked tables that are updated every day. These tables are in turn used to Update table4 fields. However, there will be times that new records will be included with the daily updates.

How do I write the Update/Append Query to handle these needs?

Thanks in advance,

Gladys Gladys Rodriguez
GlobalStrata Solutions
 
Gladys

I assume you are looking for one query that will do both the Update and the Append.

I don't think you can do this. I would create separate Append and Update queries then run them in sequence using a macro.

Hope this helps.

 
If these tables have new records all the time but also have records that need to be updated, wouldn't access give me errors if I try to run an update query on this table that has new records that are not already there or if I try to run an Append records on this table and some of the records are already there (this may even give me duplicates).

What it is, I am building my inventory information from a database that my distributor sents to me. This table has updates for pricing information, description and others updated fields for already existing products as well as new products' records. I use those daily updated files to update my existing table that is attached to my accounting system. Can you think about any other way to go about this?

Thnaks in advance,

Gladys Gladys Rodriguez
GlobalStrata Solutions
 
Gladys

You won't get errors unless the data is invalid in some way (i.e. doesn't meet the validation rules or constraints).

If your update query links the tables on their key field(s) by the default INNER JOIN, then Access will only update the records that are in both tables.

When appending new records, you can prevent duplicates being added by setting up a unique index on the fields that you don't want duplicated.

Let me know if you need further help setting this up?

Cheers

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top