title: How to return the second to last character in a string using SQL
body: <p>I am trying to only return the second to last character from a string using MS SQL.</p>
  
  <p>I've tried using MID and Substring but the length of the string isn't always the same for the column I am trying to return, So I can't do it that way.</p>
  
  <p>So say I am returning the codes of something:</p>
  
  <pre><code>Code
  '1234'
  </code></pre>
  
  <p>I want to just return '3' from that code.</p>
  
  <p>How can I do this?
  Cheers in advance :)</p>