At 06:37 PM 12/15/99 +0100, Zeugswetter Andreas SB wrote:
>
>> Next question is, do we want to leave the code as-is, or tighten up
>> the parser to reject AS-names and column numbers in GROUP BY?
>
>The numbers are also allowed in other DBMS's, so I would leave that as is.

>From Oracle:


SQL> select i from foo group by i;

         I
----------
         1

SQL> select i from foo group by 1;
select i from foo group by 1
       *
ERROR at line 1:
ORA-00979: not a GROUP BY expression


Oracle doesn't appear to allow column numbers here, FWIW and if we
care.

Which dbms's allow it?  Or is there an error in my query (I don't
use column numbering, I'm into names myself)?





- Don Baccus, Portland OR <dhogaza@pacifier.com>
  Nature photos, on-line guides, Pacific Northwest
  Rare Bird Alert Service and other goodies at
  http://donb.photo.net.

Wed, 15 Dec 1999 11:18:12 -0800
Don Baccus <dhogaza@pacifier.com>
Re: AW: [HACKERS] SELECT ... AS ... names in WHERE/GROUP
  BY/HAVING