On 2/12/16, Michele Pradella <michele.pradella at selea.com> wrote: > Why this query > PRAGMA case_sensitive_like=ON;EXPLAIN QUERY PLAN SELECT * FROM > car_plates INDEXED BY car_plates_plate > WHERE ((CarPlateType!=-1)AND((Plate LIKE 'AA00O%')OR(Plate LIKE > 'AA0O0%')))OR((CarPlateType==-1)AND((Plate LIKE '~A00O%'))) > > give me "Error: no query solution" > > if I remove the second expression ((CarPlateType==-1)AND((Plate LIKE > '~A00O%'))) it works >
All of your questions are answered in the documentation, in the links provided in previous replies. The fact that you are still asking questions tells me that I need to work on improving the documentation so that it is easier to understand. Perhaps a table that shows the various combinations of COLLATE and PRAGMA case_sensitive_like work together. I dunno. I'll take the action item to revisit the documentation and try to improve it. Meanwhile, please go reread the documentation yourself, slowly and carefully, and see if this doesn't all suddenly make sense. -- D. Richard Hipp drh at sqlite.org