Hi,
I'm a bit disoriented by the following result - here using SQLite command shell:
sqlite> .version
SQLite 3.8.6 2014-08-15 11:46:33 9491ba7d738528f168657adb43a198238abde19e
sqlite> CREATE TABLE test( col TEXT COLLATE NOCASE );
sqlite> INSERT INTO test VALUES ('b'), ('A'), ('B'), ('a');
sqlite> SELECT * FROM test;
b
A
B
a
sqlite> SELECT * FROM test WHERE col<'b';
A
a
sqlite> SELECT * FROM test WHERE LTRIM(col)<'b';
A
B
A
To me this result of the last SELECT statement is a bit unexpected. There are
no space in the values, but using LTRIM function somehow removes collation (and
uses the default BINARY collation). I would have expected the same result in
the last two SELECT statements.
Is this an error or something I haven't understood?
/Mike
PS. Is there a way to see the resulting/deduced collation of a SELECT statement?
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users