title: Mysql get substring before the last occurence of string
body: <p>I want to get the substring of a string from beginning to last occurence of a search string.</p>
  
  <p><strong>Example string</strong>: <em>"Abcd Corp is a good org to work with. Abcd corp incorporated"</em></p>
  
  <p><strong>Search String</strong>:  <em>"Corp"</em></p>
  
  <p><strong>Expected output</strong>: <em>"Abcd Corp is a good org to work with. Abcd "</em></p>
  
  <p>ie. get the string uptil the last occurrence of search string.Could anyone suggest the best way to do it?</p>