On May 1, 2010, at 12:00 PM, [email protected] wrote:

> Send SQLiteJDBC mailing list submissions to
>       [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>       https://lists.hcoop.net/listinfo/sqlitejdbc
> or, via email, send a message with subject or body 'help' to
>       [email protected]
>
> You can reach the person managing the list at
>       [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of SQLiteJDBC digest..."
>
>
> Today's Topics:
>
>   1. Case sensitivity differs from console
>      (Carlos Eduardo Moreira dos Santos)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 30 Apr 2010 19:09:57 -0300
> From: Carlos Eduardo Moreira dos Santos <[email protected]>
> Subject: [SQLiteJDBC] Case sensitivity differs from console
> To: [email protected]
> Message-ID:
>       <[email protected]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi,
>
> I'm trying to do a case-insensitive like search:
> SELECT * from cities WHERE name LIKE '%london%';
> It works fine in console, but using java the like becames case
> sensitive. I tried to use lower function, but it doesn't work. I'm
> wondering if there is a way to specify ASCII encoding to query when
> using jdbc.
>
> Thank you,
> Carlos Eduardo


First, for reference read the "The LIKE and GLOB operators" section of:

        http://www.sqlite.org/lang_expr.html

My guess is that the difference in behavior may be caused by a  
difference in which sqlite your "console" was built with, versus the  
one your SQLitejdbc was built with.  Regardless, here is my suggestion  
for working around the problem:

        SELECT * FROM cities WHERE LOWER(name) LIKE '%london%';


- Gary H
_______________________________________________
SQLiteJDBC mailing list
[email protected]
https://lists.hcoop.net/listinfo/sqlitejdbc

Reply via email to