title: Why would someone store a DECIMAL as an INT in a SQL Server database and then do the math in the software?
body: <p>I ran into a database where I was looking for a particular value to <code>SUM</code>... in this case it was <strong>distance in miles</strong>. I had a hell of a time using my "search all values in database" procedure to find how the frontend displayed value was stored in the backend database.</p>
  
  <p>That's until I realized they stored <strong>miles</strong> as an <code>integer</code> and displayed it as a <code>decimal</code>.</p>
  
  <p>For instance:</p>
  
  <ul>
  <li><p>Distance in DB: 2368 (as an <code>INT</code>)</p></li>
  <li><p>Distance in Frontend: 23.68</p></li>
  </ul>
  
  <p>Why would someone do this? Is there some sort of performance advantage?</p>
  
  <p>Edit: Also, this is a major globally used piece of software used for delivery routing... so I'm wondering if they know something I don't.</p>
  
  <p>Another note... they do store other values as <code>FLOAT</code> with the same exact 2-point precision they are displaying distance as.</p>