I used your query and devised this which works: SELECT * FROM Bible WHERE ID BETWEEN (SELECT ID FROM Bible WHERE Book=64 AND Chapter=1 AND Verse=1) AND (SELECT ID FROM Bible WHERE Book=66 AND Chapter=1 AND Verse=3);
On Mon, Dec 13, 2010 at 6:25 PM, Puneet Kishor <punk.k...@gmail.com> wrote: > > > steve mtangoo wrote: > > No problem. > > Now only If I could get the ID of the limits (that is ID for Book 1 > Chapter > > 1 and Verse 1 for example) and the end limit, my problem will be solved! > > Well, that is simple... > > SELECT ID > FROM Bible > WHERE Book = 1 AND Chapter = 1 AND Verse = 1 > > same for the ending verse. > > In fact, as you possibly noted, if the ID is sequentially assigned to > each verse (assuming, the verses have been inserted in the desired > order), you could just find out the IDs of the lower and higher verses, > and then use those to find all the verses in between. > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users