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 -> Not a group by expression

Not a group by expression

From: MM <milica.mihac_at_ck.htnet.hr>
Date: Thu, 12 May 2005 09:31:44 +0200
Message-ID: <d5v0p0$dip$1@ss405.t-com.hr>


Hello users.
In delphi 7 I'm using TADOQuery control in which I put SQL but I have problem. I can run and see the result on the grid on design time (in Delphi 7 using ), but when I run the program I get the folowing message:ORA-00979: not a GROUP BY expression.
When I run the same query without parameters it runs and it was runing well before in Oracle 8 (Now I'm using Oracle 9). Also If I don't use the GROUP BY function but with the parameter, it works also well. What is the problem?
I'm using Windows Xp.
Also I included in GROUP BY clause all SELECT expressions that are not group function arguments.

Any help is helpfull. Regards,MM

Table is:
-- Create table
create table C0NAPD1
(

BROJ_NALOGA NUMBER(8) not null,
RB NUMBER(4) not null,
IB_PROIZVODA VARCHAR2(10) not null,
KOLICINA NUMBER(12,2) not null,
DATUM_ISPORUKE DATE
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(

initial 22912K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints alter table C0NAPD1
add constraint C02NAPD1_PK primary key (BROJ_NALOGA,RB)

Query is:
select c02.ib_proizvoda,

sum(c02.kolicina) as kolicina,

from c02napd1 c02

where

c02.datum_isporuke>= :pDatum1

group by c02.IB_PROIZVODA

Regards, Milica Received on Thu May 12 2005 - 02:31:44 CDT

Original text of this message

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