Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-00979: not a GROUP BY expression - can someone help?
Mohd Al Junaibi wrote:
> Hello all,
>
> I'm receiving a ORA-00979 (NOT A GROUP BY Expression) error when I try
> to run the below statement:
>
>
> SELECT APPLICATIONAUTH.APP, APPLICATIONAUTH.GROUPNAME,
>
> ( sum(decode(optionname,'READ',1,'INSERT',3,'DELETE',5,'SAVE',7) ) )
> As authCalc,
>
> MAXAPPS.DESCRIPTION
> FROM APPLICATIONAUTH, MAXAPPS
> WHERE APPLICATIONAUTH.APP = MAXAPPS.APP
> GROUP BY APPLICATIONAUTH.APP, APPLICATIONAUTH.GROUPNAME
>
> Can someone help me? I'm new to Oracle, and I think it is a silly
> mistake.
every expression not including SUM, AVG, MIN, MAX etc
needs to be in the GROUP BY list.
You're missing one.
-- Sybrand Bakker Senior Oracle DBAReceived on Wed Jan 03 2007 - 23:58:26 CST