The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT
transaction_id,
primary_quantity,
primary_unit_of_measure,
unit_of_measure,
source_doc_unit_of_measure,
transaction_type,
shipment_line_id,
po_line_location_id,
parent_transaction_id
FROM
rcv_transactions
START WITH transaction_id = c_transaction_id
CONNECT BY parent_transaction_id = PRIOR transaction_id;
SELECT
item_id
INTO
X_item_id
FROM
rcv_shipment_lines
WHERE
shipment_line_id = v_shipment_line_id;
SELECT
transaction_type
INTO
v_parent_type
FROM
rcv_transactions
WHERE
transaction_id = v_parent_id;
SELECT
transaction_type
INTO
v_parent_type
FROM
rcv_transactions
WHERE
transaction_id = v_parent_id;
SELECT
transaction_type
INTO
v_parent_type
FROM
rcv_transactions
WHERE
transaction_id = v_parent_id;
SELECT
transaction_type,parent_transaction_id
INTO
v_parent_type,grand_parent_id
FROM
rcv_transactions
WHERE
transaction_id = v_parent_id;
SELECT
transaction_type
INTO
grand_parent_type
FROM
rcv_transactions
WHERE
transaction_id = grand_parent_id;
SELECT
ps.quantity,
ps.quantity_cancelled,
rt.quantity_billed -- This quantity is in transaction UOM
INTO
ordered_po_qty,
cancelled_po_qty,
billed_txn_qty
FROM
po_line_locations ps,
rcv_transactions rt
WHERE
rt.transaction_id = top_transaction_id and
rt.po_line_location_id = ps.line_location_id;
SELECT
transaction_id,
primary_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_id
FROM
rcv_transactions
WHERE
transaction_type = 'DELIVER' AND
po_distribution_id = c_distribution_id
START WITH transaction_id = c_transaction_id
CONNECT BY parent_transaction_id = PRIOR transaction_id
AND PRIOR transaction_type <> 'DELIVER';
SELECT
sl.item_id,
rt.primary_unit_of_measure,
rt.source_doc_unit_of_measure,
rt.unit_of_measure
INTO
X_item_id,
X_primary_uom,
X_po_uom,
X_txn_uom
FROM
rcv_shipment_lines sl,
rcv_transactions rt
WHERE
rt.transaction_id = rcv_transaction_id AND
rt.shipment_line_id = sl.shipment_line_id;
SELECT
transaction_type
INTO
v_parent_type
FROM
rcv_transactions
WHERE
transaction_id = v_parent_id;
SELECT
pd.quantity_ordered,
pd.quantity_cancelled
INTO
ordered_po_qty,
cancelled_po_qty
FROM
po_distributions pd
WHERE
pd.po_distribution_id = p_distribution_id;
SELECT
transaction_id,
amount,
amount_billed,
transaction_type,
shipment_line_id,
po_line_location_id,
parent_transaction_id,
PRIOR transaction_type parent_transaction_type
FROM
rcv_transactions
START WITH transaction_id = c_transaction_id
CONNECT BY parent_transaction_id = PRIOR transaction_id;
SELECT
transaction_id,
amount,
transaction_type,
parent_transaction_id,
PRIOR transaction_type parent_transaction_type
FROM
rcv_transactions
START WITH transaction_id = c_transaction_id
CONNECT BY parent_transaction_id = PRIOR transaction_id;
SELECT
transaction_id
FROM
rcv_transactions
WHERE
transaction_type = 'DELIVER' AND
po_distribution_id = c_distribution_id
START WITH transaction_id = c_transaction_id
CONNECT BY parent_transaction_id = PRIOR transaction_id
AND PRIOR transaction_type <> 'DELIVER';