please help with sqlite query
Community Forums/General Help/please help with sqlite query
| ||
Hi, I have a sqlite db, and I want to perform a SQL query. Table content is composed of integers in the following structure: Id | Book | Chapter | Paragraph I want to be able to do something like the following pseudo code: SELECT * FROM "content" WHERE chapter = 5 AND Paragraph = (7 to last paragraph) code goes here I don't know how to deal with the last section 7 to last Paragraph of the chapter. Is it possible by using only SQL? Thanks. |
| ||
I assume there is no greater number than the last paragraph, so wouldn't this be what you are looking for? SELECT * FROM "content" WHERE chapter = 5 AND Paragraph > 7 |
| ||
Thank you a lot Cartman, just changed 6 otherwise 7 wasn't included. Best Regards. |