Fitter Man wrote: > I've just started using Sqlite and something seems wrong. I'm sure I'm making > a mistake, but can't spot it. > > I have a process that loads data from an RSS feed into a database. All the > columns are defined as VARCHAR(255) but I figure that's irrelevant here > based on what I've read about dynamic type support. > > If I do this query: > > > select name, servings from recipe where servings >= 100 > > > I get back dozens of records rather than the 3 I ought to get. As you can > see none of these records have "servings" over 100. Here are some examples: >
Actually, from my own personal experience, it does matter. If you define the servings column as a varchar, then the comparison is done as alphanumeric, in which case '3' is indeed greater than '100'. If you define the servings column as integer, the comparison should be done as a numeric comparison, in which case 3 is less than 100. HTH, John Elrick Fenestra Technologies _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users