title: SQL Server 2008 - order by strings with number numerically
body: <p>I have following values in my table:</p>
  
  <pre><code>ABC
  ABC1
  ABC2
  ABC3 and so on...
  
  ABC11
  ABC12
  ABC13 and so on..
  
  ABC20
  ABC21
  ABC22 and so on..
  </code></pre>
  
  <p>So basically what I have is any string value (not always ABC, any string value) that can either be followed by the number or it may just be a string without the number.</p>
  
  <p>When I do select * from table order by my column asc I get following results:</p>
  
  <pre><code>ABC
  ABC1
  ABC11
  ABC12
  ABC13
  ABC2
  ABC20
  ABC21
  ABC22
  ABC3
  ABC31
  ABC32
  </code></pre>
  
  <p>I need it sorted numerically:</p>
  
  <pre><code>ABC
  ABC1
  ABC2
  ABC3
  ABC11
  ABC12
  ABC13
  ABC20
  ABC21
  ABC22
  ABC31
  ABC32
  </code></pre>
  
  <p>How can this be accomplished?</p>