Martin Engelschalk wrote: > create table TestTable (col_a numeric); > insert into TestTable (col_a) values (1); > > retrieve the row, as expected: > > select * from TestTable where col_a = '1'; > > do not retrieve the row: > > select * from TestTable where coalesce(col_a, 5) = '1' > > Can someone please explain this to me or point me to some documentation?
The col_a column has numeric affinity, so the string '1' is converted into a number. <http://www.sqlite.org/datatype3.html#affinity> The return value of the function has NONE affinity, so no automatic conversion happens. <http://www.sqlite.org/datatype3.html#expraff> Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users