Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL shortcut : how to group by 1, 2, 3 ?
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