The following lines contain the word 'select', 'insert', 'update' or 'delete':
select sum(nvl(poll.quantity,0) - nvl(poll.quantity_cancelled,0) -
nvl(poll.quantity_shipped,0))
into
poqty
from po_line_locations poll,
so_drop_ship_sources sodss
where sodss.line_id = p_lineid
and poll.line_location_id = sodss.line_location_id
and sodss.header_id = p_headerid
and nvl(poll.closed_code, '*') <> 'FINALLY CLOSED';
select user_hold_flag into po_hold_exists
from po_headers poh,
so_drop_ship_sources sodss
where
sodss.header_id = p_headerid
and sodss.line_id = p_lineid
and sodss.po_header_id = poh.po_header_id;
select sum(nvl(prl.quantity,0) - nvl(prl.quantity_cancelled,0)
- nvl(prl.quantity_delivered,0))
into
poqty
from po_requisition_lines prl,
so_drop_ship_sources sodss
where sodss.line_id = p_lineid
and prl.requisition_line_id = sodss.requisition_line_id
and sodss.header_id = p_headerid
and nvl(prl.closed_code,'*') <> 'FINALLY CLOSED';
select 'Y' into hold_exists
from so_order_holds sohlds
where ((sohlds.header_id = p_headerid)
or (sohlds.line_id = p_lineid))
and sohlds.hold_release_id is null;
select name into holdname
from so_holds
where hold_id = p_holdid;
SELECT line_detail_id
FROM so_line_details
WHERE line_id = p_line_id;
SELECT ordered_quantity
INTO v_schedule_qty
FROM so_lines_all
WHERE line_id = p_line_id;
UPDATE so_line_details
SET quantity = v_schedule_qty,
revision = NULL,
lot_number = NULL,
subinventory = NULL,
demand_class_code = NULL,
schedule_status_code = NULL,
receipt_status_code = NULL
WHERE line_detail_id = v_detail_id;
DELETE FROM so_line_details
WHERE line_id = p_line_id
AND line_detail_id <> v_detail_id;