[Home] [Help]
1015:
1016: CURSOR net_resource IS
1017: SELECT res.department_id, res.resource_id,
1018: res.organization_id, res.sr_instance_id
1019: FROM msc_department_resources res
1020: WHERE plan_id = v_plan_id;
1021:
1022: TYPE resource_table IS RECORD
1023: ( dept_id NUMBER,
1093: ' and department_id in (' || p_dept_list || ')';
1094: ELSIF p_dept_class_list IS NOT NULL THEN
1095: where_statement := where_statement ||
1096: ' and department_id in (select distinct department_id ' ||
1097: ' from msc_department_resources where NVL(department_class,''@@@'') '||
1098: ' in (' || p_dept_class_list || ') and plan_id = '
1099: ||to_char(v_plan_id)||
1100: ' and (sr_instance_id, organization_id) in ('||p_org_instance_list ||'))';
1101: ELSIF p_res_group_list IS NOT NULL THEN
1100: ' and (sr_instance_id, organization_id) in ('||p_org_instance_list ||'))';
1101: ELSIF p_res_group_list IS NOT NULL THEN
1102: where_statement := where_statement ||
1103: ' and (department_id, resource_id) in (select '||
1104: ' department_id, resource_id from msc_department_resources where ' ||
1105: ' NVL(resource_group_name,''@@@'') in ('
1106: || p_res_group_list || ') and '||
1107: ' plan_id = '||to_char(v_plan_id)||
1108: ' and (sr_instance_id, organization_id) in ('||
1207:
1208: v_agg_resource number;
1209: CURSOR agg_resource IS
1210: SELECT aggregate_resource_flag
1211: from msc_department_resources
1212: where plan_id = v_plan_id
1213: and sr_instance_id = p_instance_id
1214: and organization_id = p_org_id
1215: AND department_id = p_dept_id