23: ) is
24: --
25: -- Declare cursor
26: --
27: -- The cursor csr_sec_group joins pqh_rule_sets,
28: -- pqh_rule_attributes and PER_BUSINESS_GROUPS
29: -- so that the security_group_id for
30: -- the current business group context can be derived.
31:
32: cursor csr_sec_grp is
33: select pbg.security_group_id
34: from per_business_groups pbg
35: , pqh_rule_attributes rla
36: , pqh_rule_sets rst
37: where rla.rule_attribute_id = p_rule_attribute_id
38: and pbg.business_group_id = rst.business_group_id
39: and rst.rule_set_id = rla.rule_set_id;
40: --
94: Return Varchar2 Is
95: --
96: -- Declare cursor
97: --
98: -- Added joins between pqh_rule_sets,
99: -- pqh_rule_attributes and PER_BUSINESS_GROUPS
100: -- so that the legislation_code for
101: -- the current business group context can be derived.
102:
103: cursor csr_leg_code is
104: select pbg.legislation_code
105: from per_business_groups pbg
106: , pqh_rule_attributes rla
107: , pqh_rule_sets rst
108: where rla.rule_attribute_id = p_rule_attribute_id
109: and pbg.business_group_id = rst.business_group_id
110: and rst.rule_set_id = rla.rule_set_id;
111: --