On 11 Jan 2017, at 9:34pm, R Smith <rsm...@rsweb.co.za> wrote: > Doesn't this already do the trick? > > SELECT a FROM t WHERE a = b COLLATE NOCASE;
Right. Better still, if you declare the columns as COLLATE NOCASE in the first place, the comparison is done ignoring case without you having to state it in the SELECT. SQLite version 3.14.0 2016-07-26 15:17:14 Enter ".help" for usage hints. sqlite> CREATE TABLE MyTable (nameCS TEXT, nameCI TEXT COLLATE NOCASE); sqlite> INSERT INTO MyTable VALUES ('Albert','Albert'); sqlite> INSERT INTO MyTable VALUES ('Betty','Betty'); sqlite> SELECT * FROM MyTable WHERE nameCS='betty'; sqlite> SELECT * FROM MyTable WHERE nameCI='betty'; Betty|Betty sqlite> Statements like "I need a case-insensitive comparison function" for a database engine worry me. They make me wonder why you didn’t define your schema correctly in the first place. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users