Re: Not a group by expression
Date: Thu, 12 May 2005 09:10:31 +0200
Message-ID: <d5uvha$ba5$1_at_ss405.t-com.hr>
>>Hello users. I have a query that I can run and see the result on the grid
>>on
>>design time, but when i run the program i get the folowing
>>message:ORA-00979: not a GROUP BY expression. When I run the same query
>>with
>>out parameters it runs and it was runing well before in Oracle 8.Also If I
>>don't use the GROUP BY function but with the parameter, it works also well
>>?What is the problem? The query is:select t1.id,t2.nad,max(t2.name) as
>>namefrom c02 t1,d00 t2where t1.id = t2.idand t1.date1>= :pDate1group by
>>t2.nad, t2.idAny help is helpfull. Regards,MM
>
>
> Kako si? Give us the details of the DDL for the tables in question -
> also, this question should really be asked on
> comp.databases.oracle.server. Version number (exact) and OS info would
> also help. Hvala.
>
>
>
> Paul...
>
>
>
> --
Hi Paul. Thanks for question I'm fine.
I'm sure that problem is not in my SQL (as it work before in Oracle 8) as
error happens since I'm using Oracle 9.
Also it works if I change parametar with value. But when I change value with
parametar it doesn't work anymore.
The OS is WinXp all the time.
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 - 09:10:31 CEST