The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT transaction_id
FROM csi_transactions
WHERE inv_material_transaction_id = pc_transaction_id;
SELECT instance_id FROM csi_item_instances WHERE instance_id IN
(SELECT instance_id FROM csi_item_instances_h WHERE transaction_id IN
(SELECT transaction_id FROM csi_transactions WHERE inv_material_transaction_id = pc_transaction_id))
AND inventory_item_id IN
(SELECT inventory_item_id FROM mtl_material_transactions WHERE transaction_id = pc_transaction_id)
AND ROWNUM = 1;
SELECT transaction_id
FROM csi_transactions
WHERE source_line_ref_id = pc_transaction_id
AND transaction_type_id in (51,54,401)
AND source_header_ref IN
(SELECT order_number FROM oe_order_headers_all WHERE header_id IN
(SELECT header_id FROM oe_order_lines_all WHERE line_id = pc_transaction_id));
select link_to_line_id
into l_link_to_line_id
from oe_order_lines_all
where line_id = l_order_line_rec.order_line_id;
select count(1)
into l_exists
from csi_batch_txn_lines
where order_header_id = l_order_line_rec.header_id
and (processed_flag = 1 or processed_flag = 2);
insert into CSI_BATCH_TXN_LINES
(
BATCH_ID,
PROCESSED_FLAG,
ORDER_HEADER_ID,
ORDER_LINE_ID,
--ORGANIZATION_ID,
--INVENTORY_ITEM_ID,
TRANSACTION_TYPE,
TRANSACTION_TYPE_ID,
TRANSACTION_ID
--INSTANCE_ID,
--SERIAL_NUMBER
,CREATION_DATE
,CREATED_BY
,LAST_UPDATE_DATE
,LAST_UPDATED_BY
) VALUES
(
-1,
0,
l_order_line_rec.header_id,
l_order_line_rec.order_line_id,
--NULL,
--l_item_control_rec.inventory_item_id,
p_transaction_type,
51,
p_transaction_id
--NULL,
--NULL
,sysdate
,fnd_global.user_id
,sysdate
,fnd_global.user_id
);
x_trx_error_rec.error_stage := csi_inv_trxs_pkg.g_ib_update;