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, for the sample data earlier, it should be: select distinct substr(str, 3, 1) from items where str like "IT%"; and select distinct substr(str, 4, 1) from items where str like "ITS%"; Thanks, Mohit. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users