title: Creating SQL table using dynamic variable name
body: <p>I want to create backup SQL tables using variable names.</p>
  
  <p>something along the lines of </p>
  
  <pre><code>DECLARE @SQLTable Varchar(20) 
  SET @SQLTable = 'SomeTableName' + ' ' + '20100526' 
  SELECT * INTO quotename(@SQLTable)
   FROM SomeTableName
  </code></pre>
  
  <p>but i'm getting </p>
  
  <blockquote>
    <p>Incorrect syntax near '@SQLTable'.</p>
  </blockquote>
  
  <p>It's just part of a small script for maintence so i don't have to worry about injections.</p>