title: Oracle SQL trigger on update of column
body: <p>I'm trying to create a trigger for my table which automatically adds a published date based on when a certain flag is set to 'Y'</p>
  
  <p>I don't have much experience with creating triggers but so far this is what i've got</p>
  
  <pre><code>  create or replace
    TRIGGER ADD_CREATE_DT 
    after UPDATE of approved ON articles 
    for each row
    BEGIN
    :new.create_dt := sysdate where approved = 'Y';
    END;
  </code></pre>
  
  <p>I get this error when updating the column</p>
  
  <blockquote>
    <p>trigger 'USER.ADD_CREATE_DT' is invalid and failed re-validation</p>
  </blockquote>
  
  <p>Any ideas?</p>
  
  <p>Thanks</p>