Finding value for a specific condition
536807Jul 21 2008 — edited Jul 22 2008Hi All,
I have a several Employee Numbers in my Database Table. Each Employee is having different set of Profile Numbers.
For eg. the Table Emp_Profile contains the following
Emp No ProfileNo Salary Red_Amount
1000 11 1200 430
1000 12 100 55
1000 13 120 7
1000 14 430 8
1000 15 300 40
1000 43 200 20
1000 56 100 232
1010 11 1000 300
1010 14 110 700
1010 19 200 500
1010 12 410 545
1010 13 300 54
If the Employee contains 19,45,67,89,99,24 as ProfileNo then For Each Employee reduce the Salary value for 11 ProfileNo by the Corresponding Red_Amount
Ie the Output Should be
For
EmpNo Salary
1000 1200
1010 500 (as it has 19 ProfileNo)
Please help me in doing this task.
Regards,
Gita