501: -- get the rule count before the delete the the revenue class
502: --
503: SELECT NVL(TO_NUMBER(DECODE(SUBSTRB(USERENV('CLIENT_INFO'),1,1), ' ', NULL,
504: SUBSTRB(USERENV('CLIENT_INFO'),1,10))),-99) 505: INTO l_env_org_id FROM dual; 506:
507: SELECT count(rule_id)
508: INTO l_rule_count
509: FROM cn_rules_all_b