Re: [sqlite] Is there a way to return the row number? (NOT therowid)

2013-07-01 Thread Gabriel Corneanu
Hi, My opinion is a little different: a) of course the compiler needs to change the query program (only if "nrow" is requested/used) b) I don't know the internals, but I just can't believe that such a value could not be exported somehow c) I understand it would be non-standard; however there a

Re: [sqlite] Is there a way to return the row number? (NOT therowid)

2013-07-01 Thread Hick Gunter
] Is there a way to return the row number? (NOT therowid) Then this register value is exactly the needed result. There is also the other syntax, "limit n, m"; you have to skip somehow "m" rows. Gabriel ___ sqlite-users mailing list sql

Re: [sqlite] Is there a way to return the row number? (NOT therowid)

2013-07-01 Thread Gabriel Corneanu
Then this register value is exactly the needed result. There is also the other syntax, "limit n, m"; you have to skip somehow "m" rows. Gabriel ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlit

Re: [sqlite] Is there a way to return the row number? (NOT therowid)

2013-07-01 Thread Hick Gunter
> To: General Discussion of SQLite Database > Subject: Re: [sqlite] Is there a way to return the row number? (NOT therowid) > > > I can't wait to try > > order by row_number desc > > > On 1 Jul 2013, at 10:33, Tony Papadimitriou wrote: > >> Is there a

Re: [sqlite] Is there a way to return the row number? (NOT therowid)

2013-07-01 Thread Hick Gunter
AFAIK there is no such internal counter. As is easily verifiable via EXPLAIN, the LIMIT clause is implemented via SQLite registers in pseudocode. .explain create temp table test (a,b,c); explain select * from test limit 3; addr opcode p1p2p3p4 p5 comment --

Re: [sqlite] Is there a way to return the row number? (NOT therowid)

2013-07-01 Thread Tony Papadimitriou
e.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 , otherfields from source order by ". For this case there is a workaround, selecti