Re: [sqlite] Find the letters that can follow the current text

2009-08-25 Thread Pavel Ivanov
> Just a note: > select distinct substr(col, length(?1), 1) > should be > select distinct substr(col, length(?1) + 1, 1) Oh, yes, sure. I always mix 0-based and 1-based indexing of symbols in different languages. :) Pavel On Tue, Aug 25, 2009 at 11:50 AM, Mohit Sindhwani wrote:

Re: [sqlite] Find the letters that can follow the current text

2009-08-25 Thread Mohit Sindhwani
Pavel Ivanov wrote: > Maybe you want something like this: > > select distinct substr(col, length(?1), 1) > from table > where col like ?1||'%' > > Hi Pavel, thanks! It works..! Just a note: select distinct substr(col, length(?1), 1) should be select distinct substr(col, length(?1) + 1, 1) So,

Re: [sqlite] Find the letters that can follow the current text

2009-08-25 Thread Pavel Ivanov
Maybe you want something like this: select distinct substr(col, length(?1), 1) from table where col like ?1||'%' Pavel On Tue, Aug 25, 2009 at 10:57 AM, Mohit Sindhwani wrote: > OK, I know the subject is difficult to understand but I want to use a > sqlite table for

[sqlite] Find the letters that can follow the current text

2009-08-25 Thread Mohit Sindhwani
OK, I know the subject is difficult to understand but I want to use a sqlite table for auto-completion. So, suppose I have records that are like: ITEM0 ITS THERE ITS HERE ITIS NOW ITSY BITSY ITZ COOL And if the user has typed in "IT", I'd like to prompt him saying that the only letters that