DBA Data[Home] [Help]

APPS.PO_SOURCING_SV SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 207

     SELECT primary_unit_of_measure
     INTO   X_primary_uom
     FROM   mtl_system_items
     WHERE  inventory_item_id = p_item_id
     AND    organization_id   = p_dest_org_id;
Line: 326

    ** Note:  need 2 different selects because the AutoSource case is more
    ** precise -- need to check for the given rule id while the check in
    ** all other cases just needs to know if *any* rule is valid for the
    ** constraints.
    */

     if (X_autosource_rule_id is null) then
       select 'exists' into
       temp
       from  po_autosource_rules  par,
	     po_autosource_vendors pav
       where par.item_id = X_item_id
       and   pav.vendor_id = X_vendor_id
       and   par.autosource_rule_id = pav.autosource_rule_id
       and   trunc(sysdate) between
	     nvl(par.start_date, sysdate - 1) and
	     nvl(par.end_date, sysdate + 1);
Line: 345

       select 'exists' into
       temp
       from  po_autosource_rules  par,
	     po_autosource_vendors pav
       where par.item_id = X_item_id
       and   pav.vendor_id = X_vendor_id
       and   par.autosource_rule_id = pav.autosource_rule_id
       and   par.autosource_rule_id = X_autosource_rule_id
       and   trunc(sysdate) between
	     nvl(par.start_date, sysdate - 1) and
	     nvl(par.end_date, sysdate + 1);
Line: 373

       select 'exists' into
       temp
       from  mrp_sources_v sv
       where sv.inventory_item_id = X_item_id
       and   sv.vendor_id = X_vendor_id
       and   nvl(sv.vendor_site_id, -1) = nvl(X_vendor_site_id, -1)
       and   sv.assignment_set_id = X_assignment_set_id
       and   trunc(sysdate) between
	     nvl(sv.effective_date, sysdate - 1) and
	     nvl(sv.disable_date, sysdate + 1);
Line: 385

       select 'exists' into
       temp
       from  mrp_sources_v sv
       where sv.inventory_item_id = X_item_id
       and   sv.vendor_id = X_vendor_id
       and   nvl(sv.vendor_site_id, -1) = nvl(X_vendor_site_id, -1)
       and   sv.assignment_set_id = X_assignment_set_id
       and   sv.organization_id = X_organization_id
       and   trunc(sysdate) between
	     nvl(sv.effective_date, sysdate - 1) and
	     nvl(sv.disable_date, sysdate + 1);
Line: 399

       select 'exists' into
       temp
       from  mrp_sources_v sv
       where sv.inventory_item_id = X_item_id
       and   sv.sourcing_rule_id = X_autosource_rule_id
       and   sv.vendor_id = X_vendor_id
       and   nvl(sv.vendor_site_id, -1) = nvl(X_vendor_site_id, -1)
       and   sv.assignment_set_id = X_assignment_set_id
       and   sv.organization_id = X_organization_id
       and   trunc(sysdate) between
	     nvl(sv.effective_date, sysdate - 1) and
	     nvl(sv.disable_date, sysdate + 1);