title: How to print select results from within a stored procedure
body: <p>I have a stored procedure that I'm trying to debug (T-SQL).</p>
  
  <p>It contains creates a temporary table, and has several update statements to update it with various data.</p>
  
  <p>How can I insert statements to view the contents of this table at various points during the running of the stored procedure.</p>
  
  <p>Ideally, I'll be running this directly from MS SQL Server Management Studio, and simple output to the Message frame will suffice.</p>