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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

filter out service id base on multiple selection criterias.

Rick LayNov 13 2021 — edited Nov 13 2021

My selection criteria for a given service id must have the following.
image.png_For example, 0_432296082 and 0459436899 would meet the selection criteria the other would not. Consider for the following data sample. I'm using oracle 9i...Thank you
CREATE TABLE TMP_SELECT
(SERVICE_ID VARCHAR2(20),
CHARGE_TYPE VARCHAR2(20),
DOMAIN VARCHAR2(10),
ISSUE VARCHAR2(30),
UNDER_OVER VARCHAR2(30)
) ;
Insert into tmp_select(SERVICE_ID,CHARGE_TYPE,DOMAIN,ISSUE,UNDER_OVER) values ('0407259613','Device Payment','Mobile','Miss Aligned','Undercharge');
Insert into tmp_select(SERVICE_ID,CHARGE_TYPE,DOMAIN,ISSUE,UNDER_OVER) values ('0407259613','Monthly Plan','Mobile','Miss Aligned','Overcharge');
Insert into tmp_select(SERVICE_ID,CHARGE_TYPE,DOMAIN,ISSUE,UNDER_OVER) values ('0407259613','Recurring Charge','Mobile','Missing','Undercharge');
Insert into tmp_select(SERVICE_ID,CHARGE_TYPE,DOMAIN,ISSUE,UNDER_OVER) values ('0432296082','Device Payment','Mobile','Missing in IGEN','Undercharge');
Insert into tmp_select(SERVICE_ID,CHARGE_TYPE,DOMAIN,ISSUE,UNDER_OVER) values ('0432296082','Monthly Plan','Mobile','Miss Aligned','Undercharge');
Insert into tmp_select(SERVICE_ID,CHARGE_TYPE,DOMAIN,ISSUE,UNDER_OVER) values ('0432296082','Monthly Plan','Mobile','Missing in IGEN','Undercharge');
Insert into tmp_select(SERVICE_ID,CHARGE_TYPE,DOMAIN,ISSUE,UNDER_OVER) values ('0432296082','Recurring Charge','Mobile','Missing','Undercharge');
Insert into tmp_select(SERVICE_ID,CHARGE_TYPE,DOMAIN,ISSUE,UNDER_OVER) values ('0434496444','Monthly Plan','Mobile','Miss Aligned','Overcharge');
Insert into tmp_select(SERVICE_ID,CHARGE_TYPE,DOMAIN,ISSUE,UNDER_OVER) values ('0435554455','Device Payment','Mobile','Missing in IGEN','Undercharge');
Insert into tmp_select(SERVICE_ID,CHARGE_TYPE,DOMAIN,ISSUE,UNDER_OVER) values ('0435554455','Monthly Plan','Table','Missing in IGEN','Undercharge');
Insert into tmp_select(SERVICE_ID,CHARGE_TYPE,DOMAIN,ISSUE,UNDER_OVER) values ('0435554455','Recurring Charge','Mobile','Missing','Undercharge');
Insert into tmp_select(SERVICE_ID,CHARGE_TYPE,DOMAIN,ISSUE,UNDER_OVER) values ('0459436899','Monthly Plan','Mobile','Miss Aligned','Undercharge');

This post has been answered by Frank Kulash on Nov 13 2021
Jump to Answer
Comments
Post Details
Added on Nov 13 2021
2 comments
241 views