A
aminihojat
Hi all,
I appreciate you for taking time to response.
previous records already exists. the previous months doesn't have a date in
it . the structure of records is so:
fldmonth fldname fldworkdays fldsalary flddatediff fldsalarydiff
1 peter 30 30000
2 peter 30 30000
3 peter 30 30000
4 peter 30 45000 2006/02/21
5 peter 30 45000
1 amini 30 90000
2 amini 30 90000
3 amini 30 120000 2006/01/26
4 amini 30 120000
5 amini 30 120000
I want to update table as follow:
fldmonth fldname fldworkdays fldsalary flddatediff fldsalarydiff
1 peter 30 30000
2 peter 30 30000
3 peter 30 30000
4 peter 30
45000 2006/02/21 20000
5 peter 30 45000
1 amini 30 90000
2 amini 30 90000
3 amini 30 120000 2006/01/26
35000
4 amini 30 120000
5 amini 30 120000
for example in month 4 we understand that peter's monthly salary has raised
from 30000 to 45000 since 2006/02/11 and in this month we must calculate
difference of his salary.
our salary is monthly and for 30 days eventhough the month is 29,30 or 31
days.
We don’t have multiple years of data and for the new year we copy the
records of table for only month 12 for each person to a new table in new
database for month 1.
For february, January and other months we have only 30 days for salary.
Salary difference for
peter(45000-30000)/30)*((2006/04/30-2006/02/21)-30)=20000
Salary difference for
amini(120000-90000)/30)*((2006/03/30-2006/01/26)-30)=35000
Thank you for your help
amini
I appreciate you for taking time to response.
previous records already exists. the previous months doesn't have a date in
it . the structure of records is so:
fldmonth fldname fldworkdays fldsalary flddatediff fldsalarydiff
1 peter 30 30000
2 peter 30 30000
3 peter 30 30000
4 peter 30 45000 2006/02/21
5 peter 30 45000
1 amini 30 90000
2 amini 30 90000
3 amini 30 120000 2006/01/26
4 amini 30 120000
5 amini 30 120000
I want to update table as follow:
fldmonth fldname fldworkdays fldsalary flddatediff fldsalarydiff
1 peter 30 30000
2 peter 30 30000
3 peter 30 30000
4 peter 30
45000 2006/02/21 20000
5 peter 30 45000
1 amini 30 90000
2 amini 30 90000
3 amini 30 120000 2006/01/26
35000
4 amini 30 120000
5 amini 30 120000
for example in month 4 we understand that peter's monthly salary has raised
from 30000 to 45000 since 2006/02/11 and in this month we must calculate
difference of his salary.
our salary is monthly and for 30 days eventhough the month is 29,30 or 31
days.
We don’t have multiple years of data and for the new year we copy the
records of table for only month 12 for each person to a new table in new
database for month 1.
For february, January and other months we have only 30 days for salary.
Salary difference for
peter(45000-30000)/30)*((2006/04/30-2006/02/21)-30)=20000
Salary difference for
amini(120000-90000)/30)*((2006/03/30-2006/01/26)-30)=35000
Thank you for your help
amini