title: SQLite issues with float type and order
body: <p>I´m working with an iPhone app which has a SQLite database set up. I have a field in the database which is FLOAT type, so I have values like 10,500.00.
  The thing here is that if I select that table and order by that field, values are ordered as if it was a string value.</p>
  
  <p>Here is an example of what I´m getting:</p>
  
  <pre><code>SELECT floatField FROM table ORDER BY floatField ASC;
  </code></pre>
  
  <p>And the result is:</p>
  
  <pre><code>109,800.00
  48,950.00
  53,600.00
  54,790.00
  74,305.00
  </code></pre>
  
  <p>This is obviously wrong, cause 109,800.00 > 48,950.00 as float values. 
  So I think SQLite is working with this values as if they were strings, where 109,800.00 &lt; 48,950 where string '1' &lt; string '4'.</p>
  
  <p>If I cast the value to float using this query:</p>
  
  <pre><code>SELECT cast(floatValue as Float) FROM table ORDER BY floatField ASC;
  </code></pre>
  
  <p>The result I get is this:</p>
  
  <pre><code>109
  48
  53
  54
  74
  </code></pre>
  
  <p>So this is also wrong.</p>
  
  <p>Any ideas will be welcome!</p>