transpose row to column with condition
Hi all,
I need help to write SQL or PL/SQL or etc.. to fulfill below requirement.. when use pass the like option_id = 5
so based option_id=5, it should create string for dependent option like
(option_id=3 AND option_id=4 OR option_id=2 ) OR (option_id=5 AND option_id=6 ) AND (option_id=7 AND option_id=8 ) or as per data available in table.
Table 1 : PLATFORM_OPTION_RULE
Column Type Key Notes
RULE_ID NUMBER(10) Primary
OPTION_ID NUMBER(10)
CONDITION VARCHAR2(10) Values will be AND/OR
SEQUENCE NUMBER(10)
Data:
RULE_ID OPTION_ID CONDITION SEQUENCE
1 5 OR 1
2 5 AND 2
3 5 NULL 3
This table will contain rules for option dependency for any option if it has dependency on other options.
0