title: How to remove last to string in SQL before dash
body: <p>I have the following two strings:</p>
  
  <pre><code>hcg.com.ph?C402-10A-2010-05032017-20
  hcg.com.ph?C402-1B-2010-05032017-1
  </code></pre>
  
  <p>I want to get them in the form:</p>
  
  <pre><code>hcg.com.ph?C402-10A-2010-05032017
  hcg.com.ph?C402-1B-2010-05032017
  </code></pre>
  
  <p>I tried using <code>Left(bcode,29)</code>, but I think it's wrong because it's not same number of characters. </p>
  
  <p>How do I solve this?</p>