What about something like this: SELECT title FROM tracks WHERE singer='Madonna' AND (title<:firsttitle OR (title=:firsttitle AND rowid<:firstrowid)) ORDER BY title DESC, rowid ASC LIMIT 5;
Then you only have to remember the single title and rowid of the first item in the list. You'd have to add the rowid ASC to your index as well, but the index already needs to store the rowid so I don't think it would take more space. -Jeff On 3/15/08, dcharno <[EMAIL PROTECTED]> wrote: > >> In the next query, dump any rows where (title = > >> last_seen_title) and (rowid != last_seen_rowid). > > > > Up until you hit the last seen rowid, yes. That was my first idea as > > well. > > > Right. Tried it in a quick prototype and it seemed to worked okay. > > > > The big thing to remember is that the rowids aren't going to be > > ordered in any way. Their main useful property, in this context, is > > > I was actually trying to think if there was a way to do that. Have a > column of a view that was just an incrementing sequence. Then its a > simple matter of using this virtual index to search for the next > on-screen window. Really have to take some time to learn about these > custom functions. > > > > > > > > _______________________________________________ > 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