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

2018-05-31 Thread Shevek
chricht- 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 G

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

2018-05-31 Thread Mark Brand
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 BY considers a literal integer in this

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 "GROU

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

2018-05-30 Thread Vladimir Vissoultchev
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 BY

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

2018-05-30 Thread 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 feature I don't use. Thes

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
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

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.