title: Statement in trigger is not "picking up" the condition in its Where clause
body: <p>so I'm currently working on a MySQL trigger. I'm trying to assign values to two variables when a new record is inserted. Below are the queries:</p>
  
  <ol>
  <li><p>SET mssgDocNo = (SELECT Document_ID FROM CORE_MSSG WHERE Message_ID = new.MSSG_ID);</p></li>
  <li><p>SET mssgRegime = (SELECT CONCAT (Regime_Type, Regime_Code) FROM T_DOC WHERE CD_Message_ID = new.MSSG_ID);;</p></li>
  </ol>
  
  <p>For some reason, the second SQL query is not picking up the 'new.MSSG_ID' condition while the first query in same trigger recognizes it. I really can't figure out what seems to be the problem. </p>
  
  <p>When I replace the 'new.MSSG_ID' with a hard-coded value from the database in the second query it seems to work. I doubt the 'new.MSSG_ID' is the problem because it works perfectly fine in the first query. </p>
  
  <p>I've tried pretty much anything I could think of. Would appreciate the help.</p>