73:
74: l_stmt_id :=10;
75: ----------------------------------------------------
76:
77: select msc_hub_query_s.nextval into l_qid_vmi from dual;
78:
79: insert into msc_hub_query(
80: query_id,
81: last_update_date,
75: ----------------------------------------------------
76:
77: select msc_hub_query_s.nextval into l_qid_vmi from dual;
78:
79: insert into msc_hub_query(
80: query_id,
81: last_update_date,
82: last_updated_by,
83: creation_date,
404: msi_1.planning_make_buy_code,
405: msi_1.build_in_wip_flag,
406: nvl(f_1.number10,0) vmi_flag
407: from msc_system_items msi_1,
408: msc_hub_query f_1
409: where f_1.query_id(+) = l_qid_vmi
410: and f_1.number1(+) = msi_1.plan_id
411: and f_1.number3(+) = msi_1.sr_instance_id
412: and f_1.number4(+) = msi_1.organization_id
459: -- may get from msc_exception_f if this has performance issue
460: -- table from_date - to_date
461: from
462: msc_exception_details med,
463: msc_hub_query f_2
464: where f_2.query_id(+) = l_qid_vmi
465: and f_2.number1(+) = med.plan_id
466: and f_2.number3(+) = med.sr_instance_id
467: and f_2.number4(+) = med.organization_id
538: msi_2.planning_make_buy_code,
539: msi_2.build_in_wip_flag,
540: nvl(f_3.number10,0) vmi_flag
541: from msc_system_items msi_2,
542: msc_hub_query f_3
543: where f_3.query_id(+) = l_qid_vmi
544: and f_3.number1(+) = msi_2.plan_id
545: and f_3.number3(+) = msi_2.sr_instance_id
546: and f_3.number4(+) = msi_2.organization_id
738: msi_1.planning_make_buy_code,
739: msi_1.build_in_wip_flag,
740: nvl(f_1.number10,0) vmi_flag
741: from msc_system_items msi_1,
742: msc_hub_query f_1
743: where f_1.query_id(+) = l_qid_vmi
744: and f_1.number1(+) = msi_1.plan_id
745: and f_1.number3(+) = msi_1.sr_instance_id
746: and f_1.number4(+) = msi_1.organization_id