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!

pick %(Percentage) value from a text with most ocurrence.

kathy1234Jul 29 2019 — edited Jul 31 2019

I have to perform below task in oracle 10.2 .Can you please help.

Question :

In case of multiple percentage value of COMPLIMENT appeared in TEXT field for the same APP_ID, always populate the COMPLIMENT percentage with most occurrence.

DATA:

APP_IDTEXT
0000000550% COMPLIMENT FOR TMJ SERVICES WHEN AUTHORIZED AS  N
00000005$100 CONDITION FOR PRE AND
00000005WHAT 50% COMPLIMENT  LERGY
00000005INCASE OF 50% COMPLIMENT SERVICES PERFORMED BY  IN FULL
00000005$50 LESS; CONDITION WAIVED IF AP
00000005PLY
0000000530% COMPLIMENT LIMITED TO ONE PROGRAM OF WHICH INCL
0000000530% COMPLIMENT  WHAT SO EVER
0000000520% COMPLIMENT; IN VITRO FERTILIZATION IS NOT COVERED
0000000510% COMPLIMENT  FOR SPECIFIC

Expected Output: 50%

Because the 50% occurs most of the time in the field text.

Thanks appreciate your help!!

Comments
Post Details
Added on Jul 29 2019
28 comments
717 views