title: MySQL Trigger Update with select from another table
body: <p>Just learning about triggers and I'm created the following trigger;</p>
  
  <pre><code>CREATE TRIGGER `incremental_before_ins_tr` BEFORE INSERT ON incremental`
  FOR EACH ROW
  BEGIN
  SET NEW.source = (Select source from crm_record
  where msisdn = new.msisdn order by dat DESC limit 1);
  END;
  </code></pre>
  
  <p>However the value does not appear to be getting updated. Any ideas?</p>