title: Select distinct varchar values from a column in existing table, convert to int and insert into temp table within one step
body: <p>Is it possible to select distinct values from a varchar column of an existing table into a temp table and simultaneously convert those inserted values to int within one statement?</p>
  
  <p>If so what would the statement structure be?</p>
  
  <p>If not what would be an alternative approach?</p>
  
  <p>I've tried the following:</p>
  
  <pre><code>Select DISTINCT Convert(int, column_name) Into #temp 
  From source_table 
  Where column_name IS NOT NULL
  </code></pre>
  
  <p>but Microsoft SQL Server Management Studio warns... </p>
  
  <blockquote>
    <p>No column specified for column 1 of '#temp'.</p>
  </blockquote>
  
  <p>... and I'm not sure how to fix this error.</p>
  
  <p>If possible I would like to refrain from opening a cursor to iterate through the existing table and converting the values iteratively.</p>