Re: [sqlite] Column as a substring

2009-11-08 Thread Jean-Christophe Deschamps
>I think that my problem is in using LIKE expression for non-ascii strings. >Database encode is UTF-8. When table data in the "base" column (see my >first >message for structure) consists of english symbols (ascii) LIKE works >correct, but when I'm trying to execute it on strings consists of UTF8

Re: [sqlite] Column as a substring

2009-11-08 Thread Igor Tandetnik
Ted Rolle wrote: > SELECT * > FROM fm > WHERE name LIKE '%Julian%' > OR info LIKE '%' || name || '%' > ORDER by name; > > it returns 224 columns. > > Perhaps I'm misunderstanding the concept. > It could be returning 5 columns with 'Julian' > AND all columns where column 'name' is LIKE column in

Re: [sqlite] Column as a substring

2009-11-08 Thread Unabashed
I think that my problem is in using LIKE expression for non-ascii strings. Database encode is UTF-8. When table data in the "base" column (see my first message for structure) consists of english symbols (ascii) LIKE works correct, but when I'm trying to execute it on strings consists of UTF8 symbo

Re: [sqlite] Column as a substring

2009-11-08 Thread Unabashed
Jean-Christophe Deschamps wrote: > > > Try ... LIKE ! > select * from lemma where 'Whoever you love' like '%' || base || '%'; > If a row contains base = 'Eve' it should turn up (just an example). > > ___ > sqlite-users mailing list > sqlite-users@sq

Re: [sqlite] Column as a substring

2009-11-08 Thread P Kishor
On Sun, Nov 8, 2009 at 10:20 AM, Ted Rolle wrote: > On Sun, 8 Nov 2009 10:31:05 -0500 > "Igor Tandetnik" wrote: > >> > SELECT * >> >  FROM fm >> > WHERE name LIKE '%Juiian%' >> >   AND info LIKE '%' || name || '%' >> > ORDER by name; >> > > Thanks for seeing the oversight. > When I use > > SELECT

Re: [sqlite] Column as a substring

2009-11-08 Thread Ted Rolle
On Sun, 8 Nov 2009 10:31:05 -0500 "Igor Tandetnik" wrote: > > SELECT * > > FROM fm > > WHERE name LIKE '%Juiian%' > > AND info LIKE '%' || name || '%' > > ORDER by name; > > Thanks for seeing the oversight. When I use SELECT * FROM fm WHERE name LIKE '%Julian%' OR info LIKE '%' || name |

Re: [sqlite] Column as a substring

2009-11-08 Thread Igor Tandetnik
Ted Rolle wrote: > On Sun, 08 Nov 2009 15:06:24 +0100 > Jean-Christophe Deschamps wrote: > >> select * from lemma where 'Whoever you love' like '%' || base || '%'; > > I first tried that with this SQL statement: > > SELECT * > FROM fm > WHERE name LIKE '%Juiian%' > AND info LIKE '%' || name

Re: [sqlite] Column as a substring

2009-11-08 Thread Jean-Christophe Deschamps
>Third, my oriiginal inquiry: > >SELECT * > FROM fm > WHERE name LIKE '%Juiian%' > OR info LIKE '%Julian%' > ORDER by name; > >returned the (correct) 6 rows. BTW, if you or anyone else need a fuzzy compare function I have one that can help. It works with internally Unicode-unaccented ve

Re: [sqlite] Column as a substring

2009-11-08 Thread Ted Rolle
On Sun, 08 Nov 2009 15:06:24 +0100 Jean-Christophe Deschamps wrote: > select * from lemma where 'Whoever you love' like '%' || base || '%'; I first tried that with this SQL statement: SELECT * FROM fm WHERE name LIKE '%Juiian%' AND info LIKE '%' || name || '%' ORDER by name; returned 0

Re: [sqlite] Column as a substring

2009-11-08 Thread Jean-Christophe Deschamps
>Hello! Please, help me if you have a time for this. I have an sqlite >database >table: >CREATE TABLE lemma ( > id INTEGER PRIMARY KEY, > base TEXT, > preflex_id INTEGER, > type_ancode TEXT, > prefix_id INTEGER >) >In the "base" column I store a string which I need to compare with anoth