title: insert substring into new column
body: <p>I have a db where one column contains 2 pieces of data, e.g. first and last name.</p>
  
  <p>The format is roughly <code>ABC-1D23-4F34</code> </p>
  
  <p>I want to copy and insert the first 3 letters, the ABC, into a new column. Lets call these columns <code>[full_id]</code> and <code>[ref_id]</code> </p>
  
  <p>From reading it looks like substring is able to do this but I am doing something wrong here.</p>
  
  <p><code>INSERT INTO [ref_id]</code></p>
  
  <p><code>SUBSTRING([full_id], 1, 3)</code></p>
  
  <p><code>FROM db.Name</code></p>
  
  <p>Thank you for the help.</p>
  
  <hr>
  
  <p>EDIT:</p>
  
  <p>The update string worked. But I found that there are issues with my data and it is not all in proper formatting. </p>
  
  <p>Is there a way to write a case where if the substring is not 3 letters it writes a null value?</p>
  
  <p>Thanks again, and sorry for having bad data.</p>