Apparently result of count() and probably all other aggregate functions (as well as result of any function at all) has no affinity. So when you compare it to anything having no affinity too you have no type transformation during comparison. And thus values have to be exactly the same including their types...
Everything is explainable and probably is impossible to fix unless core aggregate functions become specially recognizable part of the core or SQLite team figures out how to make functions return their results with some affinity assigned... Pavel On Tue, Dec 15, 2009 at 10:25 AM, Simon Davies <simon.james.dav...@googlemail.com> wrote: > 2009/12/15 D. Richard Hipp <d...@hwaci.com>: >> >>> >> >> Because string '2' is not the same thing as integer 2. >> >> sqlite3> select 2='2'; >> 0 >> sqlite3> >> > > Why > sqlite> select cast( 2 as integer ) = '2'; > 1 > >> >> D. Richard Hipp >> d...@hwaci.com >> > > Simon > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users