title: Oracle SQL MAX function not returning max on VARCHAR to NUMBER conversion
body: <p>I am attempting to get the highest system number from a set of rows. The system number is preceded with <code>SYS</code>, thus <code>select SYSTEM_ID from TABLE</code> would yield, <code>{SYS901,SYS87,SYS3024.....}</code></p>
  
  <p>This is the query I'm attempting to use:</p>
  
  <p><code>select MAX(REPLACE(SYSTEM_ID,'SYS','')) from TABLE</code></p>
  
  <p>The possible results are</p>
  
  <p><code>{901,87,3024,20,1}</code></p>
  
  <p>It is returning the <code>901</code> value where I'm expecting to see the <code>3024</code> value. I assume the problem is that the field is a <code>VARCHAR</code> not a <code>NUMBER</code>. How to address this problem, I do not know. </p>