Thanks! (At least some understand what I mean!)
And people giving examples of how it can be done in C (or Python, for me) or
whatever language miss the point. We're not talking how it can be
programmatically. This is easy!!! How does one do it via pure SQL is the
real question.
As for the temporary table idea, I had this one, too! But it seems too much
overhead for such a simple thing, so I was hoping for something like an
internal symbol, or special function.
-----Original Message-----
From: Gabriel Corneanu
Sent: Monday, July 01, 2013 2:10 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Is there a way to return the row number? (NOT
therowid)
I also needed this for some special update queries.
Without many details, it was some kind of "insert into xxx select
<row()>, otherfields from source order by <custom function>".
For this case there is a workaround, selecting first into a temporary
table with auto generated rowid and using it afterwards for insert.
There are lots of other cases where this would be handy, e.g. showing
ordinal of some results.
...
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users