title: Using INSERT INTO with a variable amount of selected columns
body: <p>Is it possible to use an <code>INSERT INTO SELECT</code> when the selected columns are coming from an Sql Parameter:</p>
  
  <pre><code>@selectedColumns varchar(1000),
  @testInput1 varchar(100),
  @testInput2 varchar(100)
  
  Insert into Report
  Select @selectedColumns
  from Test
  where @testInput1 = @testInput2;
  </code></pre>
  
  <p>I get the error: <code>Column name or number of supplied values does not match table definition</code> because the values won't match up when generating the stored procedure.</p>
  
  <p>The @selectedColumns input variable is being filled from a .NET MVC Controller with the columns in a comma separated string, like so:</p>
  
  <pre><code>"Column1, Column2, Column3"
  </code></pre>
  
  <p>So it would look like 1 column when you just look at the variable, but is actually anywhere from 1 to 10(the amount in the Report table). They all have a matching column in the report table.</p>