下面是月底25日计算某员工最终工资的存储过程程序,请补全空缺处的代码。
CREATE PROCEDURE SalaryCalculation((a)) empld char(8),IN iYear number(4),IN iMonth number(2))
DECLARE
attendance number(14,2);
merit number(14.2);
overtime number(14.2);
base number(14,2);
all_salary number(14,2);
BEGIN
SELECT attendance_wage, merit_pay, overtime_wage
INTO (b)
FROM SALARY
WHERE Eid = empld FOR UPDATE
SELECT Jbase_salary INTO :base
FROM EMPLOYEES T1,(c)
WHERE T1.Jid=T2.Jid AND T1.Eid= empld;
all_salary := attendance + merit + overtime + base;
UPDATE SALARY SET salary = :all_salary
WHERE (d) AND year =iYear AND month =iMonth;
(e)
EXCEPTION
WHEN OTHERS THEN
(f)
END;