title: SSIS How to get part of a string by separator
body: <p>I need an SSIS expression to get the left part of a string before the separator, and then put the new string in a new column. I checked in derived column, it seems no such expressions. <code>Substring</code> could only return string part with fixed length. </p>
  
  <p>For example, with separator string <code>-</code> :</p>
  
  <pre><code>Art-Reading                Should return Art
  Art-Writing                Should return Art
  Science-chemistry          Should return Science
  </code></pre>
  
  <p>P.S. 
  I knew this could be done in MySQL with <code>SUBSTRING_INDEX()</code>, but I'm looking for an equivalent in SSIS, or at least in SQL Server</p>