The following lines contain the word 'select', 'insert', 'update' or 'delete':
select displayed_field
from po_lookup_codes
where lookup_type = p_lookup_type
and lookup_code = p_lookup_code
AND ROWNUM<=1;
select uom_class
from mtl_units_of_measure
where unit_of_measure = p_uom
AND ROWNUM<=1;
select unit_of_measure
from mtl_units_of_measure
where uom_code = p_uom_code
AND ROWNUM<=1;
select SUBSTRB(HZP.PARTY_NAME,1,50)
from HZ_CUST_ACCOUNTS HZCA,
HZ_PARTIES HZP
where HZCA.CUST_ACCOUNT_ID = p_customer_id
and HZCA.PARTY_ID = HZP.PARTY_ID
AND ROWNUM<=1;
select LICENSE_PLATE_NUMBER
from WMS_LICENSE_PLATE_NUMBERS
where LPN_ID = p_license_plate_id
AND ROWNUM<=1;
SELECT nvl(sum(rt.primary_quantity), 0)
INTO x_primary_child_qty
FROM rcv_transactions rt
WHERE rt.parent_transaction_id = x_transaction_id
AND rt.transaction_type <> 'CORRECT';
SELECT nvl(sum(rt.primary_quantity), 0)
INTO x_primary_child_qty_correct
FROM rcv_transactions rt
WHERE rt.parent_transaction_id = x_transaction_id
AND rt.transaction_type = 'CORRECT';
SELECT nvl(sum(decode(rti.transaction_type,'CORRECT',
rti.primary_quantity * -1,
rti.primary_quantity )
),0)
INTO x_primary_interface_qty
FROM rcv_transactions_interface rti
WHERE rti.parent_transaction_id = x_transaction_id
AND rti.processing_status_code in ('PENDING' , 'WSH_INTERFACED') -- rtv vidya
AND rti.transaction_status_code = 'PENDING'
-- rtv project : start
AND NOT EXISTS (select 1 from wsh_delivery_details wdd
where wdd.delivery_detail_id = rti.interface_source_line_id
and wdd.source_code = 'RTV'
and rti.transaction_type = 'RETURN TO VENDOR'
and rti.processing_status_code = 'PENDING');
SELECT nvl(rs.to_org_primary_quantity,0)
INTO x_primary_supply_qty
FROM rcv_supply rs
WHERE rs.rcv_transaction_id = x_transaction_id;
SELECT nvl(sum(rti.primary_quantity),0)
INTO x_primary_interface_qty
FROM rcv_transactions_interface rti
WHERE rti.parent_transaction_id = x_transaction_id
AND rti.processing_status_code = 'PENDING'
AND rti.transaction_status_code = 'PENDING';
select we.wip_entity_name,
wn.operation_seq_num,
bd.department_code
into x_wip_entity_name,
x_operation_seq_num,
x_department_code
from wip_entities we,
bom_departments bd,
wip_operation_resources wr,
wip_operations wn,
wip_operations wo
where wo.wip_entity_id = x_wip_entity_id
and wo.organization_id = x_organization_id
and nvl(wo.repetitive_schedule_id, -1) =
nvl(x_wip_repetitive_schd_id,-1)
and wo.operation_seq_num = x_wip_operation_seq_num
and wr.wip_entity_id = x_wip_entity_id
and wr.organization_id = x_organization_id
and nvl(wr.repetitive_schedule_id, -1) =
nvl(x_wip_repetitive_schd_id,-1)
and wr.operation_seq_num = x_wip_operation_seq_num
and wr.resource_seq_num = x_wip_resource_seq_num
and wn.wip_entity_id = x_wip_entity_id
and wn.organization_id = x_organization_id
and nvl(wn.repetitive_schedule_id, -1) =
nvl(x_wip_repetitive_schd_id,-1)
and wn.operation_seq_num =
decode(wr.autocharge_type,
4, nvl(wo.next_operation_seq_num, wo.operation_seq_num),
wo.operation_seq_num)
and bd.department_id = wn.department_id
and we.wip_entity_id = x_wip_entity_id
and we.organization_id = x_organization_id;
SELECT we.wip_entity_name job
INTO x_wip_entity_name
FROM wip_entities we
WHERE we.wip_entity_id = x_wip_entity_id
AND we.organization_id = x_organization_id;
SELECT wn.operation_seq_num sequence,
bd.department_code department
INTO x_operation_seq_num, x_department_code
FROM bom_departments bd,
wip_operation_resources wr,
wip_operations wn,
wip_operations wo
WHERE wo.wip_entity_id = x_wip_entity_id
AND wo.organization_id = x_organization_id
AND nvl(wo.repetitive_schedule_id, -1) =
nvl(x_wip_repetitive_schd_id, -1)
AND wo.operation_seq_num = x_wip_operation_seq_num
AND wr.wip_entity_id = x_wip_entity_id
AND wr.organization_id = x_organization_id
AND nvl(wr.repetitive_schedule_id, -1) =
nvl(x_wip_repetitive_schd_id, -1)
AND wr.operation_seq_num = x_wip_operation_seq_num
AND wr.resource_seq_num = x_wip_resource_seq_num
AND wn.wip_entity_id = x_wip_entity_id
AND wn.organization_id = x_organization_id
AND nvl(wn.repetitive_schedule_id, -1) =
nvl(x_wip_repetitive_schd_id, -1)
AND wn.operation_seq_num =
decode(wr.autocharge_type, 4,
nvl(wo.next_operation_seq_num, wo.operation_seq_num),
wo.operation_seq_num)
AND bd.department_id = wn.department_id;
select bd.department_code department
into X_department_code
from bom_departments bd,wip_operations wn
where wn.wip_entity_id = x_wip_entity_id
and wn.organization_id = x_organization_id
and nvl(wn.repetitive_schedule_id, -1) =
nvl(x_wip_repetitive_schd_id, -1)
and bd.department_id = wn.department_id;
SELECT wo.operation_seq_num sequence
INTO x_operation_seq_num
FROM wip_operations wo
WHERE wo.wip_entity_id = x_wip_entity_id
AND wo.organization_id = x_organization_id
AND nvl(wo.repetitive_schedule_id, -1) =
nvl(x_wip_repetitive_schd_id, -1)
AND wo.operation_seq_num = x_wip_operation_seq_num;
SELECT line_code
INTO x_line_code
FROM wip_lines
WHERE line_id = x_wip_line_id
AND organization_id = x_organization_id;
SELECT hazard_class
INTO x_hazard_class
FROM po_hazard_classes
WHERE hazard_class_id = x_hazard_class_id;
SELECT un_number
INTO x_un_number
FROM po_un_numbers
WHERE un_number_id = x_un_number_id;
select location_code
into x_receiving_location
from hr_locations
where location_id = x_receiving_location_id;
select location_code
into x_final_location
from hr_locations
where location_id = x_final_location_id;
select full_name
into x_person
from hr_employees
where employee_id = x_deliver_to_person_id;
select locator_type
into x_subinv_locator_type
from mtl_secondary_inventories
where organization_id = x_organization_id
and secondary_inventory_name = x_subinventory;
SELECT v.vendor_name
INTO x_vendor_name
from po_vendors v
where v.vendor_id = x_vendor_id;