title: How to substring string value in SQL Server 2008
body: <p>I have the following strings</p>
  
  <pre><code>KLPI_2012_CBBE2_E_12704_2012-09-21_13_59_52
  IYT_2012_CBBI1_S_66_2012-09-21_15_28_53
  </code></pre>
  
  <p>I want to extract everything after the 1st <code>_</code> &amp; before the 5th <code>_</code></p>
  
  <p>ex:</p>
  
  <pre><code>2012_CBBE2_E_12704 
  2012_CBBI1_S_66
  </code></pre>