I have an employee table with 3 fields
Empno, DeptNo and DeptFunding .
DeptFunding is actually is the total funding allocated to a department and not a single employee.
Unfortunately the table is already populated with the total department amount and is reflected for each employee
The actual amount for each employee to be displayed is
Deptfunding/ Total number of employees in that department )
The current data is like this
Empno DeptNo DeptFunding
----------------------------------------
101 10 3000
102 10 3000
103 10 3000
104 20 4000
105 20 4000
But it should be like this below
Empno DeptNo DeptFunding
----------------------------------------
101 10 1000
102 10 1000
103 10 1000
104 20 2000
105 20 2000
How can I achieve this with an UPDATE statement . Please suggest