Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00979 ERROR NOT A GROUP BY EXPR

853839Apr 18 2011 — edited Apr 19 2011
select isin,nomen,rd,sum(tot_bal) from (select distinct t2.c_int_isin isin,t2.c_int_longdesc||' ('||c_itd_loancd||')' nomen,tt.c_itd_rddt rd,TO_CHAR(ABS(acp_totbal),'9999999999,99,99,990.00')tot_bal
from cs_instru_t t2,cs_instrudetls_t tt,cs_acpos_t where
upper(t2.c_int_longdesc) like '%'||''||'%'
and t2.c_int_instruid=tt.c_itd_instruid and t2.c_int_instypid='1'
and acp_instruid=c_int_instruid and acp_acntnum='XYZ'
and trunc(c_itd_isuedt) between '01-Apr-2000' and '25-Apr-2002' --order by c_itd_rddt
union
select distinct c_srm_prntisin isin,c_int_longdesc||' ('||c_itd_loancd||')' nomen,c_itd_rddt rd,to_char(abs(acp_totbal),'999999999999,99,99,990.00')tot_bal
from cs_instrudetls_t insdtls,cs_strmap_t map,cs_instru_strips instru,cs_acpos_t acpos
where c_int_instruid=c_srm_prncplinsid
and c_itd_instruid=c_int_instruid
and c_srm_prncplinsid=acp_instruid
and acp_acntnum='XYZ'
and trunc(c_itd_isuedt) between '01-Apr-2000' and '25-Apr-2002')view1
group by isin
order by rd--order by c_itd_rddt

I am getting this error: ORA-00979: not a GROUP BY expression.

In the output I want to group by isin only.
I dont want it to be group by nomen as the nomen are different but isin are same. Please advice how to do it

Edited by: 850836 on Apr 18, 2011 4:57 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 17 2011
Added on Apr 18 2011
3 comments
113 views