title: Parse values from one column into multiple columns in another table
body: <p>Microsoft SQL Server 2008</p>
  
  <p>I have two tables. One has a column in it with data that is <code>_</code> delimited</p>
  
  <p>example:</p>
  
  <pre><code>Y_21_CA
  &lt;BR&gt;
  such that:
  Yes/No_Age_State
  </code></pre>
  
  <p>I need to parse the data in this column out and insert it into another table that has individual columns for each value.  Let's say Table A contains one column like the example above but Table B contains three columns, <code>YesOrNo, Age, usState</code>.</p>
  
  <p>What's the easiest way to do this?  I've tried doing something like:</p>
  
  <pre><code>UPDATE TableA
  SET YesOrNo = SUBSTRING (TableB.Column1, 1, 1)
  </code></pre>
  
  <p>but <code>SUBSTRING</code> only takes an expression. I really just need some guidance here, I've been banging my head against the wall trying to figure this out since I'm not much of a SQL guru. I can figure out the syntax no problem but maybe I'm not aware of some methods that exist.  Thanks</p>