[Home] [Help]
1028: p_transaction_id number) return number is
1029:
1030: cursor c_53 is
1031: select 'EXISTS'
1032: from msc_exception_details
1033: where number1 = p_transaction_id
1034: and sr_instance_id = p_instance_id
1035: and plan_id = p_plan_id
1036: and exception_type = 53
1072: -- one exception in any date-range)
1073: --------------------------------------------------------
1074: cursor resource_constraint_cur is
1075: select 'EXISTS'
1076: from msc_exception_details
1077: where number1 = p_transaction_id
1078: and sr_instance_id = p_instance_id
1079: and plan_id = p_plan_id
1080: and exception_type =36
1104: p_department_id number, p_resource_id number, p_exception_type number) return number is
1105:
1106: cursor c_excp is
1107: select 'EXISTS'
1108: from msc_exception_details
1109: where plan_id = p_plan_id
1110: and sr_instance_id = p_instance_id
1111: and organization_id = p_organization_id
1112: and department_id = p_department_id
1656: p_inventory_item_id number, p_transaction_id number) return number is
1657:
1658: cursor c is
1659: select 1
1660: from msc_exception_details
1661: where number1 = p_transaction_id
1662: and sr_instance_id = p_instance_id
1663: and plan_id = p_plan_id
1664: and exception_type =36
4890: elsif p_from_block = 'EXCEPTION' then
4891: sql_stat := 'SELECT mrr.sr_instance_id, '||
4892: ' mrr.transaction_id '||
4893: ' FROM msc_supplies mrr, '||
4894: ' msc_exception_details med '||
4895: ' WHERE mrr.plan_id = '||p_plan_id ||
4896: ' and mrr.plan_id = med.plan_id '||
4897: ' and ( (mrr.transaction_id = med.number1 and '||
4898: ' med.exception_type in (6,7,8,9,10,32,34,53,54,58))'||
4900: ' med.exception_type = 37)) '|| p_where ||
4901: ' union select mrr.sr_instance_id, '||
4902: ' mrr.supply_id transaction_id '||
4903: ' FROM msc_resource_requirements mrr, '||
4904: ' msc_exception_details med '||
4905: ' where med.exception_type in (21,22,36,45,46) '||
4906: ' AND med.plan_id = mrr.plan_id ' ||
4907: ' AND med.organization_id = mrr.organization_id ' ||
4908: ' AND med.sr_instance_id = mrr.sr_instance_id ' ||
4952: ' mrr.department_id, '||
4953: ' mrr.resource_id '||
4954: ' FROM msc_resource_requirements mrr, ' ||
4955: ' msc_department_resources mdr, ' ||
4956: ' msc_exception_details med ' ||
4957: ' WHERE mrr.plan_id = :1 '||
4958: ' AND mdr.plan_id = mrr.plan_id '||
4959: ' AND mdr.organization_id = mrr.organization_id ' ||
4960: ' AND mdr.sr_instance_id = mrr.sr_instance_id'||