Hi, I am working in 3.3.6 My table is as follows: "create table MUSIC(id integer primary key,Album text,Artist text);" Id Album Artist 1 eeee z 2 dddd w 3 cccc s 4 aaaa t
I want to sort the Album First and then I have to tell the rowid of the particular string pattern.If that pattern is not present it has to provide the next string match. I tried as follows: "CREATE TABLE IF NOT EXISTS Temp as SELECT Album from MUSIC ORDER BY Album; Rowid Id Album 1 4 aaaa 2 3 cccc 3 2 dddd 4 1 eeee SELECT rowid,Album FROM Temp WHERE Album like 'c%'; Output: rowed -> 2 and Album -> cccc My doubt is for this statement "SELECT rowid , Album FROM Temp WHERE Album like 'b%'; " I am not having any Album with match pattern starting with b so I want the rowed and Album for the string next to the provided ie, rowed ->3 and Album -> cccc. Can any one please help to solve my problem. Thanks & Regards, Mahalakshmi.M _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users