View Full Version : table update


piersonb
02-29-2008, 07:02 AM
Ok I have 2 tables. (transaction and update) transaction contains 3 fields [account], [set 1] and [set 2]. Update contains 2 fields [account] and [value]. [account] links the two tables together.

What I am trying to do is create a query that takes the 2 tables and adds the information in [value] to [set 2] for each matching account. Some fields in [accounts] in transactions already have information but those accounts don't match any in the update table.

I would like to have the transaction table be the final resting point of the merge data if possible. I am also hoping to do this with out creating a new table but if that is the only way to do this then I can.

Here is the database I am using as my example and testing environment.

Any help or pointers are welcome.

Thank you.

Brianwarnock
02-29-2008, 07:23 AM
Sounds like a standard update query, having read Access help what problems are you having.

Brian

piersonb
02-29-2008, 07:32 AM
I may not be doing the update query correctly but from the looks of it I can not update the table with the valuse from the other table.

Brianwarnock
02-29-2008, 07:43 AM
UPDATE TRANSACTIONS INNER JOIN [update] ON TRANSACTIONS.account = update.Account SET TRANSACTIONS.[Set 2] = [update]![value];

Brian

I hope you read help.

piersonb
02-29-2008, 07:45 AM
ok I feel silly now.

Thank you Brian.

Brianwarnock
02-29-2008, 07:48 AM
We've all been there :), but it is important to read help and understand what's happening, by trying things.

brian

piersonb
02-29-2008, 08:53 AM
That’s why I created my testing database, to find out what is actually happening.

My real DB has 12 sets with over 2000 accounts, fund groups and account notes. the update has to be able to place the update value correct set without changing the data in the other sets based on what month it is and which minor fund group (a subset of the Fund group) is selected. Now that I have this simple problem fixed. My complex problem was a snap to fix.

Sometimes it’s a very good idea to remember the basic. So again thank you Brian.