Skip to Main Content

SQL & PL/SQL

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!

not a group by expression error

NeilCSEFeb 28 2011 — edited Feb 28 2011
Could any one help me in resolving the below error, I have this query in a procedure which is causing the group by error
v_z has assigned 0 in the begining
SELECT     DISTINCT 'I'  region_type, 
                b_no, 
                issuer_region_id, 
                issuer_country, 
                SUM(base_mkt_value) over(PARTITION BY b_no, issuer_country, issuer_region_id)mv, 
                v_z a109, 
                v_z a110 
FROM   B_RISK_POS 
WHERE  B_NO = 591
GROUP BY 
               'I' , 
                b_no, 
                ISSUER_REGION_ID, 
                ISSUER_COUNTRY;
                v_z;       
ORA-00979: not a GROUP BY expression
00979. 00000 - "not a GROUP BY expression"
*Cause:
*Action:
Error at Line: 5 Column: 24
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 28 2011
Added on Feb 28 2011
6 comments
13,627 views