Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> A question about GROUP BY (ORA-00979: not a GROUP BY expression)
Hi,
I'm trying the same query in Oracle 9i and Oracle 817 and receive
different results. Can you help to explain the reason? Thanks!
The query is
select cast(deptno as number(10)), min(salary)
from table1
group by cast(deptno as number(10));
The types of the columns are
DEPTNO NUMBER(3) SALARY NUMBER(10)
In Oracle 9i, I received the following error
ERROR at line 1:
ORA-00979: not a GROUP BY expression
In Oracle 817, correct result is returned.
Is there any new restrictions introduced in Oracle 9i? What is the reason Oracle 9i raises the error?
Thanks,
Lan
Received on Wed Dec 03 2003 - 12:26:10 CST
![]() |
![]() |