title: SQL Server value help
body: <p>Hey all, is there any SQL Server 2005 guru that can tell me a type of trick to get the values of what is being queried?</p>
  
  <p>Ex:</p>
  
  <pre><code> UPDATE l SET Inactive = 1 
   FROM tbl1 e JOIN tbl2 l ON l.CID = e.CID
       JOIN tbl3 p ON p.PID = e.PID
       JOIN tbl4 c ON c.PID = e.PID
       LEFT JOIN tbl5 g ON g.EID = e.ID 
           AND g.PID = e.PID
   WHERE e.PID = '315' 
   AND Inactive = 0 
   AND (e.Active = 0 OR g.ID IS NULL)
  </code></pre>
  
  <p>How can I get the values of, say, e.CID after this executes? I've already tried</p>
  
  <pre><code> Print e.CID
  </code></pre>
  
  <p>But of course that does not work. Any other way to do that?</p>
  
  <p>Thanks!</p>
  
  <p>David</p>