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
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
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
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
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
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
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
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
8 matches
Mail list logo