DBA Data[Home] [Help]

VIEW: APPS.CN_RULES_SEARCH

Source

View Text - Preformatted

SELECT s.ruleset_id, s.name ruleset_name, r.rule_id, r.name rule_name, c.name revenue_class, s.start_date, s.end_date, rh.parent_rule_id, decode(r2.rule_id, -1002, null, r2.name) parent_rule_name from cn_rulesets s, cn_rules r, cn_revenue_classes c, cn_rules r2, cn_rules_hierarchy_all rh WHERE r.ruleset_id = s.ruleset_id and r.revenue_class_id = c.revenue_class_id (+) and r.rule_id = rh.rule_id (+) and r.ruleset_id = rh.ruleset_id (+) and rh.parent_rule_id = r2.rule_id (+) and rh.ruleset_id = r2.ruleset_id (+) and r.rule_id <> -1002
View Text - HTML Formatted

SELECT S.RULESET_ID
, S.NAME RULESET_NAME
, R.RULE_ID
, R.NAME RULE_NAME
, C.NAME REVENUE_CLASS
, S.START_DATE
, S.END_DATE
, RH.PARENT_RULE_ID
, DECODE(R2.RULE_ID
, -1002
, NULL
, R2.NAME) PARENT_RULE_NAME
FROM CN_RULESETS S
, CN_RULES R
, CN_REVENUE_CLASSES C
, CN_RULES R2
, CN_RULES_HIERARCHY_ALL RH
WHERE R.RULESET_ID = S.RULESET_ID
AND R.REVENUE_CLASS_ID = C.REVENUE_CLASS_ID (+)
AND R.RULE_ID = RH.RULE_ID (+)
AND R.RULESET_ID = RH.RULESET_ID (+)
AND RH.PARENT_RULE_ID = R2.RULE_ID (+)
AND RH.RULESET_ID = R2.RULESET_ID (+)
AND R.RULE_ID <> -1002