Re: check while appending data
- From: "Ramesh" <rameshmshetty@xxxxxxxxx>
- Date: Tue, 24 Jun 2008 10:48:10 +0530
Thanks Sir, I got the idea,
Thanks
Ramesh
"Ron2006" <ronnemec@xxxxxxxxxxx> wrote in message
news:b126aff0-d843-45c2-a6e0-41f76d6eaccd@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
If this states you unique key:
Querry will generate unique payment ID for eachemployee(combination
of
EmployeeID&monthID&yeardID)
Then make the following change to your "Append" Query.
In the design view. instead of haveing just the new data table there
add the table you are attempting to update and join the two via the
unique payment ID. However change the join logic to read ALL of the
new data and only those of the old data that match. (usually a left
join).
Change the query to an update query instead of an append query.
Be sure to update each of the fields with the corresponding
information.
This new query will update all that match and append any new ones.
Below is the sql for a tiny test set of tables that I created to check
it out.
UPDATE Table4 LEFT JOIN Table4Add ON Table4.Key1 = Table4Add.Key1 SET
Table4Add.Key1 = [Table4]![Key1], Table4Add.data = [Table4]![data];
Ron
.
- References:
- check while appending data
- From: Ramesh
- Re: check while appending data
- From: bhicks11 via AccessMonster.com
- Re: check while appending data
- From: Ron2006
- check while appending data
- Prev by Date: Re: Update - fill blank fields based on match
- Next by Date: Re: Insufficient Memory after XP memory upgrade.
- Previous by thread: Re: check while appending data
- Next by thread: Re: Merging First and Last Name fields
- Index(es):
Relevant Pages
|