3903: where query_id = p_query_id;
3904:
3905: cursor c_mis_inst_org (l_plan number, l_item number, l_supp number, l_supp_site number) is
3906: select sr_instance_id, organization_id
3907: from msc_item_suppliers
3908: where plan_id = l_plan
3909: and inventory_item_id = l_item
3910: and supplier_id = l_supp
3911: and supplier_site_id = l_supp_site;
3936: bulk collect into v_row_index, v_start_date, v_qty
3937: from msc_calendar_dates mca,
3938: msc_plans mp,
3939: msc_supplier_capacities msc,
3940: msc_item_suppliers mis,
3941: msc_gantt_query mgq
3942: where mgq.query_id = p_query_id
3943: and mgq.row_index = l_row_index
3944: and mgq.row_flag = SYS_YES
3979: bulk collect into v_row_index, v_start_date, v_qty
3980: from msc_form_query mfq,
3981: msc_plans mp,
3982: msc_supplier_capacities msc,
3983: msc_item_suppliers mis,
3984: msc_gantt_query mgq
3985: where mgq.query_id = p_query_id
3986: and mgq.row_index = l_row_index
3987: and mgq.row_flag = SYS_YES
9028: FROM msc_trading_partners mtp,
9029: --msc_trading_partners mtp2,
9030: msc_trading_partner_sites mtps,
9031: msc_system_items msi,
9032: msc_item_suppliers mis,
9033: msc_gantt_query mgq
9034: WHERE mgq.query_id = :p_query_id
9035: and mis.plan_id = mgq.plan_id
9036: and mis.supplier_id = mgq.supplier_id