Re: [sqlite] I'm trying to figure out how to ...

2014-09-18 Thread FarSight Data Systems
Kieth, Thanks for the reply. I should have asked sooner and would have wasted less time trying to do something sqlite wasn't meant for. I will however look up rolling cursors. That may help a little. Again, thanks. Mark On Wednesday, September 17, 2014 11:14:36 PM Keith Medcalf wrote:

Re: [sqlite] I'm trying to figure out how to ...

2014-09-18 Thread Nico Williams
If you do a select with the an ORDER BY ... DESC (or ASC) LIMIT 1, with the order-by clause matching one of the indexes on that table, then you'll get the last row without having to use a rowid. For example: CREATE TABLE person (firstname TEXT, lastname TEXT, stuff TEXT, PRIMARY KEY (lastname,

Re: [sqlite] I'm trying to figure out how to ...

2014-09-18 Thread Mark Halegua
Kieth, Thanks for the reply. I should have asked sooner and would have wasted less time trying to do something sqlite wasn't meant for. I will however look up rolling cursors. That may help a little. Again, thanks. Mark On Wednesday, September 17, 2014 11:14:36 PM Keith Medcalf wrote:

Re: [sqlite] I'm trying to figure out how to ...

2014-09-18 Thread Pavlos Christoforou
Thanks Keith, We have taken the liberty to forward your answer to our whole dev team, your insights on the subject are useful to all of us. Cheers Pavlos On 18 September 2014 07:14, Keith Medcalf wrote: > > You cannot do any of these things in any relational database.

Re: [sqlite] I'm trying to figure out how to ...

2014-09-18 Thread John McKown
And _excellent_ reply. I'm grabbing this email to put as a "gist" on my github account. From my own experience, programmers who come from a "non-relational" background, the world view of how to _properly_ do SQL is difficult. On Thu, Sep 18, 2014 at 12:14 AM, Keith Medcalf

Re: [sqlite] I'm trying to figure out how to ...

2014-09-18 Thread RSmith
On 2014/09/18 05:38, Mark Halegua wrote: I'm racking my brain trying to figure out how to get directly to the last item in a (potentially) sorted or ordered table. At least oe of the tables will be ordered by a name and a date, so uising the rtowid won't work. Also, how to traverse a table

Re: [sqlite] I'm trying to figure out how to ...

2014-09-17 Thread Keith Medcalf
You cannot do any of these things in any relational database. You can only do this in navigational databases. There are various kludges which permit you to simulate navigational abilities on top of relational databases, but they are all kludges which are performed by various forms of fakery

[sqlite] I'm trying to figure out how to ...

2014-09-17 Thread Mark Halegua
I'm racking my brain trying to figure out how to get directly to the last item in a (potentially) sorted or ordered table. At least oe of the tables will be ordered by a name and a date, so uising the rtowid won't work. Also, how to traverse a table or cursor in a reverse direction. Going