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

Update Query using the value in the sum field

Status
Not open for further replies.

schar

Programmer
Oct 9, 2010
2
US
I have one table with the fields EMPNUM, STSPERCENT, BUDGET.
There are many entries for the EMPNUM and some with only One EMPNUM. Example below:

EMPNUM STSPERCENT BUDGET
1000 500 1200
1000 700 1200
2000 1000 1000

The goal is to 1) GROUP the same EMPNUM
2) Sum(STSPERCENT)
3) Save the Sum(STSPERCENT) Value into Budget for all the same EMPNUM.

Can anyone provide the SQL Statement to accomplish that?
 
Typically you don't save values that can be calculated. Also, why would you want to save the same sum in multiple records?

I expect if you can provide a good reason for storing a value that can be calculated, someone will tell you how this can be done.

Duane
Hook'D on Access
MS Access MVP
 
I believe the purpose of any forum is to ask questions and learn. There is no need to justify asking a question.
 
I was hoping to learn why you would take a value that can calculated and store it in multiple places in your database. There might be some reason(s) I am not familiar with.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top