updating Table

AccessWater

Registered User.
Local time
Today, 06:27
Joined
Jun 14, 2006
Messages
52
I have a table (A) with three variables: ProjectID, SubprofileID, and Budget. A projectID may have several subprofileIDs. I need to update this table monthly. Each month, I will get a table (B) with exact format. I want to update table A using data from Table B. I used UPDATE..... Left JOIN. But there is a probelm. For example, if project XX is not in Table B, the budget of project XX will be empty in Table A after updating whcih originally has data. Also, if Table B has a new Project YY, it is not added into Table A.

Could anyone help me with it?

Thank you very mcuh.
 
if you are trying to do all records at once you are not going to be able to unless you code for it. otherwise you will need to create several queries to catch all possibilities.
 
Also, realize that using recordsets to update will not catch error.

What I would do is-

First make queries to update all lookup tables and other data that the table will reference.

Make another query to update the main table, then a third or more queries to update the secondary tables.

You can have a event that holds all three queries and do it in one go. Also, if you search around on the forum, there should be a thread describing how to catch exceptions and save to temporary table for manual editing if necessary.
 

Users who are viewing this thread

Back
Top Bottom