samedi 25 avril 2015

Trigger compilation error


Hello I need some help in creating my trigger here is my trigger please tell me which part of my code is wrong so I could work on it, Thanks

create or replace trigger trigger_one 
before insert on Funtom_timesheet
for each row
Declare
V_id    number;
V_hours number;
Begin
Select max(timesheet_ID)+1 into v_id from Funtom_timesheet
:new.timesheet_ID :=v_id;
select grade_hours into V_hours
from funtom_grade join funtom_employee
on emp_grade = grade_id
where empid = :new.timesheet_emp;
if V_hours >:new.timesheet_hours
else
:new.timesheet_overtime :=
:new.timesheet_hours-V_hours
:new.timesheet_hours:= V_hours;
END IF;
END;
/


Aucun commentaire:

Enregistrer un commentaire