In my database sqlite I have a column with float numbers and times stored as strings, why when I try to order them with this query
select... order by cast("+filter+" as real)
return my numbers column with this wrong sequence:
22,5
23
23,5
23
23,5
24,5
24
or my times column also with this wrong sequence:
00:56
00:57
00:52
00:46
Try
Sqlite expects dot, not comma, as a fraction part separator. It also silently ignores unconvertable tail, so ‘24,5’ is converted to 24.0.
As of your times column, it will be sorted well if you sort it as string, without casting to float. But if you want to cast it for some reason, you may turn colons into dots with
replace.