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!

Compare 3 column Values

Madhavan AsokanOct 30 2023

Hi Everyone,

I need to write a logic to derive a rank based on a definition in lookup for which there can be multiple combination.

E.x: I have a definition of a row in lookup if the 3 columns has Low(Attribute1), Medium(Attribtue2), High(Attribute3) then final value should be Medium. I have three columns Col1, Col2, Col3 which can have value of Low, Medium, High with multiple combination. I need to write a logic where the lookup row should check all below combinations(Col1, Col2, Col3) and give output as Medium

Medium, Low, High

Medium, High, Low

Low, Medium, High

Low, High, Medium

High , Low, Medium

High, Medium, Low

Comments
Post Details
Added on Oct 30 2023
8 comments
830 views