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 -> A question about GROUP BY (ORA-00979: not a GROUP BY expression)

A question about GROUP BY (ORA-00979: not a GROUP BY expression)

From: Lan Huang <lanegroups_at_go.com>
Date: 3 Dec 2003 10:26:10 -0800
Message-ID: <48e0b0fb.0312031026.dfe37a4@posting.google.com>


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

Original text of this message

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