61: p_plan_name,
62: orgs.organization_id
63: FROM mfg_lookups lu,
64: mrp_item_exceptions ex,
65: mrp_plan_organizations_v orgs
66: WHERE lu.lookup_type = 'MRP_EXCEPTION_CODE_TYPE'
67: AND lu.lookup_code <=10
68: AND ex.exception_type = lu.lookup_code
69: AND ex.organization_id = orgs.planned_organization
86: SET number3 = /* number of orders */
87: (SELECT COUNT(r.organization_id)
88: FROM mrp_recommendations r,
89: mrp_item_exceptions e,
90: mrp_plan_organizations_v orgs
91: WHERE ((q.number1 = 6 /* reschedule in */
92: AND r.new_schedule_date < r.old_schedule_date)
93: OR
94: (q.number1 = 7 /* reschedule out */
148: orgs.organization_id
149: FROM mfg_lookups lu,
150: mrp_item_exceptions ex,
151: mrp_system_items sys,
152: mrp_plan_organizations_v orgs
153: WHERE lu.lookup_type = 'MRP_EXCEPTION_CODE_TYPE'
154: AND lu.lookup_code <=10
155: AND lu.lookup_code = ex.exception_type
156: AND ex.display = SYS_YES