title: SQL Server 2008 SELECT * FROM @variable?
body: <p>It is possible?</p>
  
  <pre><code>DECLARE @vTableName varchar(50)
  
  SET @vTableName = (SELECT TableName FROM qms_Types WHERE Id = 1)
  
  SELECT * FROM @vTableName
  </code></pre>
  
  <p>I have this error:</p>
  
  <blockquote>
    <p>Msg 1087, Level 16, State 1, Line 3 Must declare the table variable
    "@vTableName".</p>
  </blockquote>