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<m...@onghu.com> wrote: > 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 can follow this are: "E,S,I,Z" > If he then types in "S", I'd like to update the result and show that the > next letters that can follow are: "(space), Y" > > Any ideas on how I could do this efficiently? > > Thanks, > Mohit. > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users