create or replace trigger SET_HEADCOUNT_TRIG
before insert on HIRING_TBL_TESTING
for each row
begin
if :new.HIRING_STATUS = 'Started'
:new.HEADCOUNT := 'Yes';
elseif :new.ROLE_STATUS = 'On Board'
:new.HEADCOUNT := 'Yes';
elseif :new.ROLE_STATUS = 'Open Position'
:new.HEADCOUNT := 'No';
elseif :new.ROLE_STATUS IS NULL
:new.HEADCOUNT := 'No';
end if;
end;
|