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

2013-07-04 Thread James K. Lowden
On Wed, 3 Jul 2013 22:49:51 -0500 "Jay A. Kreibich" wrote: > So anyways, I don't actually care about the actual number of orders, > which is mostly likely what my SQL query returns, I just want the > ranking-- who is first, second, and third. I can get that from an >

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

2013-07-03 Thread Jean-Christophe Deschamps
At 05:49 04/07/2013, you wrote: ´¯¯¯ But in the bigger context of this discussion, I think SQLite might consider a row_number() function, or (my personal preference) some type of virtual column, such as "_row_number_". I suggest that term, since that's what Oracle, MS SQL Server, and

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

2013-07-03 Thread Jay A. Kreibich
On Tue, Jul 02, 2013 at 11:40:34AM +0100, Alex Bowden scratched on the wall: > > The SQL standard has always been a moving feast, chasing the field > implementations, perfectly capable of going back on it's earlier > mistakes, the main purpose of which, on a good day, is to promote >

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

2013-07-02 Thread James K. Lowden
On Mon, 1 Jul 2013 23:30:10 -0500 "Jay A. Kreibich" wrote: > While rearranging the column order may not functionally change the > answer, a database is not given that flexibility in SQL. For > example, "SELECT *" *must* return the columns in the order they are > defined

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

2013-07-02 Thread Alex Bowden
The SQL standard has always been a moving feast, chasing the field implementations, perfectly capable of going back on it's earlier mistakes, the main purpose of which, on a good day, is to promote standardisation of SQL implementations and try and keep to the Relational Theory model where

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

2013-07-01 Thread Jay A. Kreibich
On Mon, Jul 01, 2013 at 10:52:20PM -0400, James K. Lowden scratched on the wall: > "select *" is shorthand for "all columns". You'll note that what's > returned isn't some kind of special '*' column, but all columns. The > order in which the columns are returned isn't meaningful because the >

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

2013-07-01 Thread Roman Fleysher
--- From: Alex Bowden > Sent: Monday, July 01, 2013 6:17 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Is there a way to return the row number? (NOTthe rowid) > > ___ > sqlite-users mailing li

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

2013-07-01 Thread James K. Lowden
On Mon, 1 Jul 2013 14:22:53 +0300 "Tony Papadimitriou" wrote: > Just because you can select something doesn't mean you have to be > able to sort by it. Yes, it does. > Can you sort by * (select * by table sort by *)? You have confused syntax with semantics. "select *"

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

2013-07-01 Thread Keith Medcalf
Yes, you can sort by * > -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Tony Papadimitriou > Sent: Monday, 1 July, 2013 05:23 > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Is there a way to return

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

2013-07-01 Thread Alex Bowden
July 01, 2013 6:17 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Is there a way to return the row number? (NOTthe rowid) > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8

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

2013-07-01 Thread Tony Papadimitriou
Subject: Re: [sqlite] Is there a way to return the row number? (NOTthe rowid) ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

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

2013-07-01 Thread Alex Bowden
> Please! Just because you can select something doesn't mean you have to be > able to sort by it. There are a small number of exceptions, each of which is a bodge. But some bodges are worth the impact. > Can you sort by * * is a very useful and largely harmless bodge. There is

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

2013-07-01 Thread Tony Papadimitriou
Please! Just because you can select something doesn't mean you have to be able to sort by it. Can you sort by * (select * by table sort by *)? So, why make it sound like I don't know what I'm talking about? -Original Message- From: Alex Bowden Sent: Monday, July 01, 2013 2:07 PM