You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Carlos Monteiro <un...@gmail.com> on 2013/10/25 19:19:51 UTC

Sqlite Like operator

Hi,

How do you get around the sqlite case sensitive bug?

http://www.sqlite.org/lang_expr.html
 (A bug: SQLite only understands upper/lower case for ASCII characters by
default. The LIKE operator is case sensitive by default for unicode
characters that are beyond the ASCII range. For example, the expression *
'a' LIKE 'A'* is TRUE but *'æ' LIKE 'Æ'* is FALSE.)


Do I need to change the version of sqlite? how would I do that?

I'm using Flex 4.6 air 3.4

Best Regards,
Carlos

Re: Sqlite Like operator

Posted by Carlos Monteiro <un...@gmail.com>.
Even if I use:

SELECT upper('João') Like upper('JOÃO') as value

It returns false.

public function testLike():Boolean{
var stmt:SQLStatement = new SQLStatement();
stmt.sqlConnection = sqlConnection;
 stmt.text = "SELECT upper('João') Like upper('JOÃO') as value";
stmt.execute();
var result:Array = stmt.getResult().data;
 if (result) return result[0].value;
else return false;
}



On 25 October 2013 18:32, Neil Huyton <ne...@gmail.com> wrote:

> I don't know your specific use case, but I just use lower() in my queries.
>
>
> On 25 October 2013 18:19, Carlos Monteiro <un...@gmail.com> wrote:
>
> > Hi,
> >
> > How do you get around the sqlite case sensitive bug?
> >
> > http://www.sqlite.org/lang_expr.html
> >  (A bug: SQLite only understands upper/lower case for ASCII characters by
> > default. The LIKE operator is case sensitive by default for unicode
> > characters that are beyond the ASCII range. For example, the expression *
> > 'a' LIKE 'A'* is TRUE but *'æ' LIKE 'Æ'* is FALSE.)
> >
> >
> > Do I need to change the version of sqlite? how would I do that?
> >
> > I'm using Flex 4.6 air 3.4
> >
> > Best Regards,
> > Carlos
> >
>

Re: Sqlite Like operator

Posted by Neil Huyton <ne...@gmail.com>.
I don't know your specific use case, but I just use lower() in my queries.


On 25 October 2013 18:19, Carlos Monteiro <un...@gmail.com> wrote:

> Hi,
>
> How do you get around the sqlite case sensitive bug?
>
> http://www.sqlite.org/lang_expr.html
>  (A bug: SQLite only understands upper/lower case for ASCII characters by
> default. The LIKE operator is case sensitive by default for unicode
> characters that are beyond the ASCII range. For example, the expression *
> 'a' LIKE 'A'* is TRUE but *'æ' LIKE 'Æ'* is FALSE.)
>
>
> Do I need to change the version of sqlite? how would I do that?
>
> I'm using Flex 4.6 air 3.4
>
> Best Regards,
> Carlos
>