PL/SQL secario
i cant get this question anyone have any ideas?
The scenario is: the trustee of the company in
question are unhappy that the commission earned by the employees is somewhat adhoc.
They want to link the commission of an employee to his/her performance in the
following manner: each employee gets as commission 10% of the total commission
earned by people s/he directly supervises. Accordingly, only employees who do not
supervise anyone will get the commission listed in the employee table. (Unlisted
commission will be treated as 0 for this purpose.) Commission of other employees
will be recalculated and displayed, again listing the EmployeeID, first name, last
name and revised commission, in the ascending order of last names. Eg.
SQL> exec HRManage.Scenario;
222: Sunny Chen-- 0
543: Derek Dev-- 0
135: Stanley Garner-- 300
...
given
--------
The package HRManage consists of the following procedures and functions.
PROCEDURE AddBob;
PROCEDURE AddDependent(in_emp_id IN Employee.EmployeeID%TYPE,
in_emp_rel IN Dependent.Relation%TYPE,
in_rel_dob IN varchar2);
PROCEDURE JobChange(in_emp_id IN Employee.EmployeeId%TYPE,
in_last_name IN Employee.Lname%TYPE,
in_first_init IN char);
FUNCTION Is_Manager(in_emp_id IN employee.EmployeeId%TYPE)
RETURN BOOLEAN;
FUNCTION Calculate_Payout(in_emp_id IN Employee.EmployeeId%TYPE)
RETURN NUMBER;
PROCEDURE Fire_Employee(in_emp_id IN Employee.EmployeeId%TYPE);
PROCEDURE Underlings(in_emp_id IN Employee.EmployeeId%TYPE);
PROCEDURE Scenario;
|