title: Need to find first empty field, and update
body: <p>I am working with a database schema that I cannot change - and I need to run a bulk update. I am moving data between source and target databases, with the same schema. I know this is awful, but it is what I am working with right now.</p>
  
  <p>The schema is as follows:</p>
  
  <pre><code>Car
  CarType1
  CarType2
  CarType3
  CarType4
  </code></pre>
  
  <p>What I am trying to do - is bring over the CarTypes from my source database, by updating the target CarTypes.</p>
  
  <p>My question is:</p>
  
  <p>If my source record for car "BMW" has 3 CarTypes specified like so:</p>
  
  <pre><code>Car: BMW
  CarType1: Fast
  CarType2: Well Made
  CarType3: Good Handling
  CarType4: NULL
  </code></pre>
  
  <p>and my target has:</p>
  
  <pre><code>Car: BMW
  CarType1: Fun Car
  CarType2: NULL
  CarType3: NULL
  CarType4: NULL
  </code></pre>
  
  <p>How would I write an update statement such that CarType1-2-3 from the source would fill in the available NULL fields on the target? So Source:CarType1 -> Target:CarType2. And also - would there be a way to cancel out of the bulk update for this record and log a message if there wasn't room in the target for all of the source fields(say if there's 4 CarType values in my source, and only 3 NULL CarType columns in the corresponding target row?</p>
  
  <p>Thank you!</p>