title: Oracle Trigger Creation Issue
body: <p>i am working on an assignment which does the below.</p>
  
  <blockquote>
    <p>create a PL/SQL trigger called STAFF_TRIGGER on the STAFF table. This
    trigger will be executed after every insert or update.  a.For inserts,
    this trigger should put the new STAFF.STAFF_ID value, the user in
    MOD_USER, and the system date in MOD_TIMESTAMP to record the creation
    of the data into STAFF_LOG.  b.For updates, this trigger should put
    the previous STAFF values into the corresponding STAFF_LOG column as
    well as recording the MOD_USER and MOD_TIMESTAMP.</p>
  </blockquote>
  
  <p>So far this is what i have, i am using oracle database express edition.</p>
  
  <pre><code>create trigger staff_trigger
  after insert or update on staff
  for each row 
  
  begin 
  
  if inserting then 
     insert into staff_log (staff_id, mod_user, mod_timestamp)
     values(new.employee_id, new.last_name, sysdate);
  end if;
  
  if updating then  
     insert into staff_log (mod_user, mod_timestamp)
     values(new.last_name, sysdate);
  end if;
  
  end;
  </code></pre>
  
  <p>When i execute the code i am getting the below error.</p>
  
  <pre><code>ERROR at line 9: PL/SQL: SQL Statement ignored7. if inserting then 
  8.    insert into staff_log (staff_id, mod_user, mod_timestamp)
  9.    values(new.employee_id, new.last_name, sysdate);
  10. end if;
  </code></pre>
  
  <p>Any ideas as to what may be the cause of this?</p>