title: Trim numbers from end of SQL variable
body: <p>I have a SQL variable called <code>@FileName</code> which I need to trim numbers off the end. Heres an example of how my strings look at the moment, and how i need them to be:</p>
  
  <p><code>lorem-1</code> to <code>lorem</code></p>
  
  <p><code>lorem-ipsum-456</code> to <code>lorem-ipsum</code> <em>(<strong>note</strong>: '-' in the middle remains)</em></p>
  
  <p><code>foo-123-bar-1234</code> to <code>foo-123-bar</code> <em>(<strong>note</strong>: number in the middle remains)</em></p>
  
  <p><code>123-lorem</code> to <code>123-lorem</code> <em>(<strong>note</strong>: no change as no number and '-' at the end)</em></p>
  
  <p>Is this possible?</p>
  
  <p>Thanks.</p>