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

How can I copy a column sum to another database?

Status
Not open for further replies.

Zoon

Technical User
Nov 27, 2002
28
0
0
US
I have 2 databases, customer.mdb has fields ID and NUMBER, sales.mdb has ID, CODE and AMOUNT. Customer has 2000 records and sales has 20000 records.

ID and CODE are text fields, NUMBER and AMOUNT are number fields.

Customer.mdb has data in ID and there are no duplicates of ID it is a key, NUMBER is blank.

Sales.mdb has data in all 3 fields. ID is the same as ID in customer.mdb but there are duplicates.

I need to get the sum of column AMOUNT for each group of ID and CODE in sales.mdb.

I did this with select, sum, as, and group by. This makes 2000 records with a sum, out of 20000, but it is only a report.

The question is, how can I copy the sum of AMOUNT in sales.mdb to NUMBER in customer.mdb when the ID fields match?

Is this even possible?


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top