The following lines contain the word 'select', 'insert', 'update' or 'delete':
select wdj.scheduled_start_date,
wdj.scheduled_completion_date
into l_startDate, l_endDate
from wip_discrete_jobs wdj
where wdj.organization_id = p_orgID
and wdj.wip_entity_id = p_wipEntityID;
delete wip_operation_resource_usage
where wip_entity_id = p_wipEntityID;
wip_op_resources_utilities.update_resource_instances(
p_wip_entity_id => p_wipEntityID,
p_org_id => p_orgID);
select inventory_item_id,
-1*operation_seq_num operation_seq_num
from wip_requirement_operations
where organization_id = p_orgID
and wip_entity_id = p_wipEntityID
and operation_seq_num < 0
and wip_supply_type = wip_constants.phantom;
select job_type,
status_type,
primary_item_id,
bom_reference_id,
routing_reference_id,
bom_revision_date,
routing_revision_date,
alternate_bom_designator,
alternate_routing_designator
into l_jobType,
l_jobStatus,
l_assemblyID,
l_bomRefID,
l_rtgRefID,
l_bomRevDate,
l_rtgRevDate,
l_altBom,
l_altRtg
from wip_discrete_jobs
where organization_id = p_orgID
and wip_entity_id = p_wipEntityID;
wip_update_setup_resources.delete_setup_resources_pub(
p_wip_entity_id => p_wipEntityID,
p_organization_id => p_orgID);
delete from wip_operations
where wip_entity_id = p_wipEntityID
and organization_id = p_orgID;
delete from wip_operation_resources
where wip_entity_id = p_wipEntityID
and organization_id = p_orgID;
delete from wip_sub_operation_resources
where wip_entity_id = p_wipEntityID
and organization_id = p_orgID;
fnd_attached_documents2_pkg.delete_attachments(
x_entity_name => 'WIP_DISCRETE_OPERATIONS',
x_pk1_value => to_char(p_wipEntityID),
x_pk3_value => to_char(p_orgID),
x_delete_document_flag => 'Y');
select wdj.scheduled_start_date,
wdj.scheduled_completion_date
into l_startDate, l_endDate
from wip_discrete_jobs wdj
where wdj.organization_id = p_orgID
and wdj.wip_entity_id = p_wipEntityID;
delete from wip_requirement_operations
where wip_entity_id = p_wipEntityID
and organization_id = p_orgID;
delete wip_operation_resource_usage
where wip_entity_id = p_wipEntityID;
wip_op_resources_utilities.update_resource_instances(
p_wip_entity_id => p_wipEntityID,
p_org_id => p_orgID);
update wip_operations
set first_unit_start_date = p_startDate,
first_unit_completion_date = p_startDate,
last_unit_start_date = p_startDate,
last_unit_completion_date = p_startDate
where organization_id = p_orgID
and wip_entity_id = p_wipEntityID;
update wip_operation_resources
set start_date = p_startDate,
completion_date = p_startDate
where organization_id = p_orgID
and wip_entity_id = p_wipEntityID;
update wip_sub_operation_resources
set start_date = p_startDate,
completion_date = p_startDate
where organization_id = p_orgID
and wip_entity_id = p_wipEntityID;
update wip_requirement_operations wro
set wro.date_required = (select nvl(max(wo.first_unit_start_date), l_startDate)
from wip_operations wo
where wo.organization_id = wro.organization_id
and wo.wip_entity_id = wro.wip_entity_id
and wo.operation_seq_num = abs(wro.operation_seq_num))
where wro.wip_entity_id = p_wipEntityID
and wro.organization_id = p_orgID;