title: Choosing when to insert data into Identity column
body: <p>I am trying to do a bulk insert from a select statement, but sometimes I would like to save the Identity from Table2 to Table1, but sometimes I want the Identity in the Table to be generated automatically when there is no data in Table2, So how would this be accomplished?</p>
  
  <pre><code> INSERT INTO Table (ID,Name) 
   SELECT 
    CASE WHEN Col1 IS NOT NULL THEN Col1 ELSE @@identity END ID,
    Col2 Name,
   FROM Table2
  </code></pre>
  
  <p>Is this possible or do I have to do 2 seperate bulk import processes?</p>