-1

I want to search for all values, which are bigger than 0.9. I can't show you the name of the attribute, because these are company internal names. But they are not necessary to show the current problem.

search bigger than

And this is the result:

enter image description here

My question: How is this possible? Is this the same reason as described in Is floating point math broken? ??

Makuna
  • 558
  • 1
  • 6
  • 19

1 Answers1

1
SELECT 0.8 > 0.9;
0
SELECT '0.8' > 0.9;
1

You have strings in your database, and in SQLite's sort order, they are considered larger than any number.

CL.
  • 173,858
  • 17
  • 217
  • 259