79: CURSOR c_active_hier( cp_bus_grp_id number
80: ,cp_hier_ver_id number
81: ,cp_eff_date date ) IS
82: select 1
83: from per_gen_hierarchy_versions
84: where business_group_id = cp_bus_grp_id
85: and hierarchy_version_id = cp_hier_ver_id
86: and cp_eff_date between date_from and nvl(date_to,cp_eff_date)
87: and status = 'A';
91: ,cp_entity_id varchar2
92: ,cp_eff_date date ) IS
93: select 1
94: from per_gen_hierarchy_nodes pghn
95: ,per_gen_hierarchy_versions pghv
96: ,per_gen_hierarchy pgh
97: where pghn.business_group_id = cp_bus_grp_id
98: and pghn.node_type = cp_node_type
99: and pghn.entity_id = cp_entity_id
413: CURSOR c_active_hier( cp_bus_grp_id number
414: ,cp_hier_ver_id number
415: ,cp_eff_date date ) IS
416: select 1
417: from per_gen_hierarchy_versions
418: where business_group_id = cp_bus_grp_id
419: and hierarchy_version_id = cp_hier_ver_id
420: and cp_eff_date between date_from and nvl(date_to,cp_eff_date)
421: and status = 'A';
494:
495: CURSOR c_hier_status( cp_hier_ver_id number
496: ,cp_version_no number ) IS
497: select business_group_id, status
498: from per_gen_hierarchy_versions
499: where hierarchy_version_id = cp_hier_ver_id
500: and version_number = cp_version_no;
501:
502: CURSOR c_get_nodes( cp_bus_grp_id number
512: ,cp_entity_id varchar2
513: ,cp_eff_date date ) IS
514: select 1
515: from per_gen_hierarchy_nodes pghn
516: ,per_gen_hierarchy_versions pghv
517: ,per_gen_hierarchy pgh
518: where pghn.business_group_id = cp_bus_grp_id
519: and pghn.node_type = cp_node_type
520: and pghn.entity_id = cp_entity_id