[Home] [Help]
2333: FROM ahl_mc_relationships
2334: WHERE relationship_id = c_child_relationship_id
2335: AND (parent_relationship_id = c_parent_relationship_id OR
2336: mc_header_id IN (SELECT mc_header_id
2337: FROM ahl_mc_config_relations
2338: WHERE relationship_id = c_parent_relationship_id
2339: AND trunc(nvl(active_start_date, SYSDATE)) <= trunc(SYSDATE)
2340: AND trunc(nvl(active_end_date, SYSDATE+1)) > trunc(SYSDATE)));
2341:
2392: AND trunc(nvl(R.active_end_date, SYSDATE+1)) > trunc(SYSDATE)
2393: AND H.name = c_mc_name
2394: AND H.revision = c_mc_revision
2395: AND H.mc_header_id IN (SELECT mc_header_id
2396: FROM ahl_mc_config_relations
2397: WHERE relationship_id = c_relationship_id
2398: AND trunc(nvl(active_start_date, SYSDATE)) <= trunc(SYSDATE)
2399: AND trunc(nvl(active_end_date, SYSDATE+1)) > trunc(SYSDATE));
2400:
3414: FROM ahl_mc_relationships
3415: WHERE relationship_id = c_child_relationship_id
3416: AND (parent_relationship_id = c_parent_relationship_id OR
3417: mc_header_id IN (SELECT mc_header_id
3418: FROM ahl_mc_config_relations
3419: WHERE relationship_id = c_parent_relationship_id
3420: AND trunc(nvl(active_start_date, SYSDATE)) <= trunc(SYSDATE)
3421: AND trunc(nvl(active_end_date, SYSDATE+1)) > trunc(SYSDATE)));
3422:
3543: l_instance_rec csi_item_instance_csr%ROWTYPE;
3544:
3545: CURSOR check_sub_mc(c_relationship_id NUMBER) IS
3546: SELECT mc_header_id
3547: FROM ahl_mc_config_relations
3548: WHERE relationship_id = c_relationship_id
3549: AND trunc(nvl(active_start_date, SYSDATE)) <= trunc(SYSDATE)
3550: AND trunc(nvl(active_end_date, SYSDATE+1)) > trunc(SYSDATE);
3551:
4816: -- Check to see this UC is a subconfig
4817: --
4818: AND EXISTS (
4819: SELECT 1
4820: FROM ahl_mc_config_relations R
4821: WHERE R.mc_header_id = U.mc_header_id
4822: AND R.relationship_id = c_relationship_id
4823: AND trunc(nvl(R.active_start_date, SYSDATE)) <= trunc(SYSDATE)
4824: AND trunc(nvl(R.active_end_date, SYSDATE+1)) > trunc(SYSDATE)
5622: --Either JOIN or IN, performance cost is bigger than EXISTS
5623: AND EXISTS
5624: (
5625: SELECT 1
5626: FROM ahl_mc_config_relations R
5627: WHERE R.mc_header_id = U.mc_header_id
5628: AND R.relationship_id = c_relationship_id
5629: AND trunc(nvl(R.active_start_date, SYSDATE)) <= trunc(SYSDATE)
5630: AND trunc(nvl(R.active_end_date, SYSDATE+1)) > trunc(SYSDATE)
6824: -- If the top instance is expired then this UC is also taken as Expired
6825: AND trunc(nvl(CII.active_end_date, SYSDATE+1)) > trunc(SYSDATE)
6826: -- Check if this is a applicable alternate subconfig for the position
6827: AND (EXISTS (SELECT 1
6828: FROM ahl_mc_config_relations AMCR
6829: WHERE AMCR.mc_header_id = U.mc_header_id
6830: AND AMCR.relationship_id = c_relationship_id
6831: AND trunc(nvl(AMCR.active_start_date, SYSDATE)) <= trunc(SYSDATE)
6832: AND trunc(nvl(AMCR.active_end_date, SYSDATE+1)) > trunc(SYSDATE))
7172: -- If the top instance is expired then this UC is also taken as Expired
7173: AND trunc(nvl(CII.active_end_date, SYSDATE+1)) > trunc(SYSDATE)
7174: -- Check if this is a applicable alternate subconfig for the position
7175: AND (EXISTS (SELECT 1
7176: FROM ahl_mc_config_relations AMCR
7177: WHERE AMCR.mc_header_id = U.mc_header_id
7178: AND AMCR.relationship_id = c_relationship_id
7179: AND trunc(nvl(AMCR.active_start_date, SYSDATE)) <= trunc(SYSDATE)
7180: AND trunc(nvl(AMCR.active_end_date, SYSDATE+1)) > trunc(SYSDATE))