Aaron Drake <aar...@bsquare.com> wrote: > The column was originally populated with both numeric and NULL > values. I > did not specify what type of data would be in the column, preferring > to > let SQLite dynamically type it. However in this case it has come back > to > bite me since it appears that any column with both numeric and NULL > values will be considered as TEXT.
The "type" of the column is not determined in any way by its contents. For details, see http://www.sqlite.org/datatype3.html I bet you inserted your data as text in the first place, as in INSERT INTO AlertErrors(..., subCode) VALUES (..., '0') or something equivalent. Try running this: update AlertErrors set subCode = cast(subCode as integer); then run your ogirinal query again. Once you get this working, examine the parts of your program where you populate AlertErrors table (and perhaps other tables), and make sure you insert integers, and not strings, wherever you expect to get integers back later. Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users