Re: [sqlite] [EXTERNAL] unexpected error with "GROUP BY 0"

2018-05-30 Thread Hick Gunter
Yes. If the expression is a constant integer K, then it is considered an alias for the K-th column of the result set. Columns are ordered from left to right starting with 1. There is no 0-th column, so GROUP BY 0 is "out of range", just the same as "SELECT 0 GROUP BY 31" would be. -Ursprün

Re: [sqlite] [EXTERNAL] unexpected error with "GROUP BY 0"

2018-05-30 Thread Mark Brand
Thanks. I had forgotten that GROUP BY considers a literal integer in this context to be a column number, a feature I don't use. These, on the other hand, work as I would have expected: sqlite> select 0 group by cast (0 as int); 0 sqlite> select 0 group by (select 0); 0 Mark On 30/05/18 12:00

Re: [sqlite] [EXTERNAL] unexpected error with "GROUP BY 0"

2018-05-30 Thread Hick Gunter
te.org] Im Auftrag von Mark Brand Gesendet: Mittwoch, 30. Mai 2018 12:11 An: sqlite-users@mailinglists.sqlite.org Betreff: Re: [sqlite] [EXTERNAL] unexpected error with "GROUP BY 0" Thanks. I had forgotten that GROUP BY considers a literal integer in this context to be a column numbe

Re: [sqlite] [EXTERNAL] unexpected error with "GROUP BY 0"

2018-05-30 Thread Mark Brand
m Auftrag von Mark Brand Gesendet: Mittwoch, 30. Mai 2018 12:11 An: sqlite-users@mailinglists.sqlite.org Betreff: Re: [sqlite] [EXTERNAL] unexpected error with "GROUP BY 0" Thanks. I had forgotten that GROUP BY considers a literal integer in this context to be a column number, a f

Re: [sqlite] [EXTERNAL] unexpected error with "GROUP BY 0"

2018-05-30 Thread Vladimir Vissoultchev
L does. cheers, -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Mark Brand Sent: Wednesday, May 30, 2018 5:22 PM To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] [EXTERNAL] unexpected error with "GROUP

Re: [sqlite] [EXTERNAL] unexpected error with "GROUP BY 0"

2018-05-31 Thread Hick Gunter
other expression" -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Mark Brand Sent: Mittwoch, 30. Mai 2018 16:22 To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] [EXTERNAL] unexpected error with "GROUP BY 0&q

Re: [sqlite] [EXTERNAL] unexpected error with "GROUP BY 0"

2018-05-31 Thread Mark Brand
t- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Mark Brand Gesendet: Mittwoch, 30. Mai 2018 12:11 An: sqlite-users@mailinglists.sqlite.org Betreff: Re: [sqlite] [EXTERNAL] unexpected error with "GROUP BY 0" Thanks. I had forgotten that GROUP

Re: [sqlite] [EXTERNAL] unexpected error with "GROUP BY 0"

2018-05-31 Thread Shevek
have only one output row. -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Mark Brand Gesendet: Mittwoch, 30. Mai 2018 12:11 An: sqlite-users@mailinglists.sqlite.org Betreff: Re: [sqlite] [EXTERNAL] unexpected error with &quo