title: Creating a status update trigger
body: <p>I have 2 tables like so:</p>
  
  <p><strong>JOBS</strong> table</p>
  
  <pre><code>Jobcode    UserId    Status
  101        130       R
  102        139       D
  </code></pre>
  
  <p><strong>USERS</strong> table</p>
  
  <pre><code>UserId    Email
  130       test@example.com
  </code></pre>
  
  <p>I want to create a trigger on insert and update that sends an email to my stored procedure:</p>
  
  <pre><code>EXEC dbo.SendMyEmail @email, @jobcode;
  </code></pre>
  
  <p>when the jobcode is inserted as 'D' or updated to 'D'.</p>