title: SELECT MAX returns the wrong value
body: <p>I have a SQL database with a table called <code>premisis</code>. I wish to select the row with the highest <code>premisisnumber</code>. </p>
  
  <p>This is the SQL I'm using:</p>
  
  <pre><code>SELECT max(premisisnr) AS premisisnr FROM premisis
  </code></pre>
  
  <p>The problem is, SQL Server returns the wrong value! In my table I've got a row with <code>premisisnumber</code> 10, but using the SQL statement above returns the row with <code>premisisnumber</code> 9. </p>
  
  <p>Why? Also, how do I solve this? </p>