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!

Please provide the query for this.

976208Mar 6 2014 — edited Mar 6 2014

Hi Experts,

I want to display the CMS_CODE,  CMS_ID,  CM_AMOUNT columns values of only CMS_ID = 3

which CMS_CODE is having CMS_ID 3 and not having CMS_CODE  5

for each CMS_CODE group.

CMS_CODE  CMS_ID  CM_AMOUNT

44557      1        1000

44557      2        2000

44557      3        3000

5678       1        1000

5678       2        2000

5678       3        5000

1234       1        1000

1234       5        2000

1234       4        3000

456        1        1000

456        2        2000

456        5        3000

33333      1        1000

33333      2        2000

33333      3        3000

33333      4        8000

The output should be.

CMS_CODE  CMS_ID  CM_AMOUNT

44557      3        3000

5678       3        5000

33333      3        8000

Please help me.

Thanks.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 3 2014
Added on Mar 6 2014
11 comments
176 views