title: SQL Server EXEC backup table with date dynamically
body: <p>I am looking to backup a table and auto add the date to the end of the table name.</p>
  
  <p>Here is what I have</p>
  
  <pre><code>declare @table char(36)= 'template_fields'
  
  EXEC('select * into '+@table+'_'+'convert(date, getdate()) from '+@table)
  </code></pre>
  
  <p>And I want the end result to look something like </p>
  
  <pre><code>template_fields_09-09-2015
  </code></pre>
  
  <p>What am I missing here?</p>