On 31 Jan 2010, at 2:19pm, james pruett wrote: > I am having trouble getting any results using this query. This returns > none.... > > select * from signs where lon>-121 and lon<-119; > > onCreate(SQLiteDatabase db) { > db.execSQL("CREATE TABLE " + TABLE_NAME + " (" + _ID > + " INTEGER PRIMARY KEY AUTOINCREMENT, " + TIME > + " VARCHAR(45), " + TAGG > + " VARCHAR(45), " + LAT > + " FLOAT , " + LON
SQLite does not have a 'FLOAT' type (or indeed a VARCHAR type). See http://www.sqlite.org/datatype3.html and define your 'lon' column as REAL. Also see further down the page: sqlite does not actually do column types: you could define a column as REAL but still put a string into that column of one row. So make sure that your numbers are actually being stored as numbers, not strings, by testing the method you use to create a row. You can do this by creating a row, then using the function 'typeof(lon)'. If you did it right, that should return 'real'. If you didn't, it might return 'text'. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users