The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT nvl(sum(rt.primary_quantity), 0)
INTO x_correct_qty
FROM rcv_transactions rt
WHERE rt.parent_transaction_id = x_parent_trx_id
AND rt.transaction_type = 'CORRECT';
select sum(quantity) into l_quantity from rcv_transactions where
shipment_line_id = x_shipment_line_id
and transaction_type = 'RECEIVE';
SELECT rt2.quantity, rt2.transaction_type, rt.transaction_type
FROM rcv_transactions rt2, rcv_transactions rt
WHERE rt2.shipment_line_id = x_shipment_line_id
AND
(
(rt2.parent_transaction_id = x_parent_id AND rt2.transaction_type IN ('CORRECT', 'RETURN TO VENDOR') AND rt.transaction_id = x_parent_id) OR
(rt.transaction_id=rt2.parent_transaction_id and rt.transaction_type = 'RETURN TO VENDOR' )
);
SELECT rt2.amount, rt2.transaction_type, rt.transaction_type
FROM rcv_transactions rt2, rcv_transactions rt
WHERE rt2.shipment_line_id = x_shipment_line_id
AND rt2.parent_transaction_id = x_parent_id
AND rt2.transaction_type IN ('CORRECT', 'RETURN TO VENDOR')
AND rt.transaction_id = x_parent_id;
SELECT transaction_id,
quantity,
transaction_type,
parent_transaction_id
FROM rcv_transactions
START WITH transaction_id = c_transaction_id
CONNECT BY parent_transaction_id = PRIOR transaction_id;
SELECT transaction_type
INTO l_parent_type
FROM rcv_transactions
WHERE transaction_id = l_parent_id;
SELECT quantity_received
INTO qty_rec
FROM po_line_locations_all
WHERE line_location_id = line_loc_id;