I have a sqlite DB with a table with the following structure LocationName Latitude Longitude all defined as varchar. How i can construct a sql statement to get all the locations with a specific lat range given latitude in decimal. is there a way to do that convert from varchar to decimal value on the fly ? or i have to step through the return statements and do the conversion manually
31 Answer
SELECT CAST('3.02' as decimal) -- they aren't real decimals in sqlite, though. beware floats. 3