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:
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,
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:
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.
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
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
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
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
8 matches
Mail list logo