May be I misrepresented myself.
I know SQL but this seems to be SQLite3 specific thing.
The query below does not work and the reason is Chapters and verses are
repetitive. For example Book 1 will have chapters 1, 2, 3, 4, 5 and then
Book 2 will have 1, 2, 3, 4, 5 , 6, 7 and then Book 3 will have 1, 2, 3, 4,
5 .

I asked it in general SQL language forum and something said in MySQl there
is something called row constructs SELECT * FROM bible  WHERE (1,1,3) <=
(book, chapter, verse) AND (book, chapter, verse) <= (1,2,2)

See the link with the same question as mine
http://stackoverflow.com/questions/1365678/selecting-a-range-of-rows-using-3-different-indices



On Mon, Dec 13, 2010 at 5:04 PM, Puneet Kishor <punk.k...@gmail.com> wrote:

>
>
> steve mtangoo wrote:
> >   I have a  script that is supposed to query the Bible scriptures between
> two
> > intervals. My table is named Bible and have columns: ID (int), Book
> (int),
> > Chapter(int), Verse (int) and Scripture(text).
> >
> > Now the books are unique i.e. 1-66 but chapters keep repeating, and so do
> > verses. Now suppose I want to get scripture between book 1 chapter 1
> verse 1
> > and book 2 chapter 3 Verse 1, how do I go about?
>
>
> SELECT Scripture
> FROM Bible
> WHERE
>     Book > 0 AND Book < 3 AND
>     Chapter > 0 AND Chapter < 4 AND
>     Verse > 0 AND Verse < 2
>
> > My knowledge of SQLite3
> > have taken me to a dead end!
>
> You need to acquire knowledge of SQL, not sqlite3. Google for tutorials.
>
> >
> > You can check how bible have its chapters and verses arranged at
> > www.biblegateway.com.
> >
> > Thanks!
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
>
> --
> Puneet Kishor
> _______________________________________________
> 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

Reply via email to