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!

Adding values in one field to values in another table with a query

Status
Not open for further replies.

redaccess

MIS
Aug 2, 2001
110
0
0
US
I want to add two fields together that are in seperate tables based on similar ID numbers through the use of a query.
Something like the following.

Table A Table B
ID Value ID Value
001 6 001 8
002 5 002 5

Results......
Table B
ID Value
001 14
002 10

I want the values to go into Table B only.
 
Hi,

You may have some difficulty with advice on this unless it is further explained. You want to store calculated values: against "the rules of normalization". Values should be recalculated with each form, report, etc. There are exceptions, but I have yet to discover what they are!

Good luck Gus Brunston :cool: An old PICKer, using Access2000
padregus@attbi.com

 
In the instance above the SQL below taken from Access would work:

UPDATE [Table A] INNER JOIN [Table B] ON [Table A].ID = [Table B].ID SET [Table B].[Value] = [Table A]![Value]+[Table B]![Value];
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top