Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL shortcut : how to group by 1, 2, 3 ?

Re: SQL shortcut : how to group by 1, 2, 3 ?

From: Brian Dick <bdick_at_home.com>
Date: Wed, 14 Nov 2001 19:17:05 GMT
Message-ID: <RqzI7.9654$Xb7.58109@news1.wwck1.ri.home.com>


You can't do that with GROUP BY. It only works with ORDER BY.

"Olivier Migeon" <olivier_at_phgroup.com> wrote in message news:3BF2B814.65B40156_at_phgroup.com...
> (running 8.1.6 standard edition on a Linux Mandrake 7.2)
>
> Hi all,
>
> I'm unable to use the rank of the fields instead of their actual name in
> my ORDER BY and GROUP BY statements.
> It's not a SQLPLUS problem, because I've got the same problem with all
> my applications.
> I guess it should be some point of configuration, but I can't find out.
> Or would it be something only available in the enterprise edition?
>
> select mdate, count(*) from mtable group by 1
> *
> ERROR at line 1:
> ORA-00979: not a GROUP BY expression
>
> Thanks for any help,
>
> Olivier
Received on Wed Nov 14 2001 - 13:17:05 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US