The following lines contain the word 'select', 'insert', 'update' or 'delete':
l_line_tbl(i).operation = OE_GLOBALS.G_OPR_UPDATE THEN
oe_debug_pub.add('Operation -Update');
l_line_tbl(i).operation:=OE_GLOBALS.G_OPR_UPDATE;
SELECT NVL(MAX(LINE_NUMBER)+1,1)
INTO x_line_number
FROM OE_ORDER_LINES_ALL
WHERE HEADER_ID = p_header_id;
SELECT NVL(MAX(SHIPMENT_NUMBER)+1,1)
INTO x_shipment_number
FROM OE_ORDER_LINES
WHERE HEADER_ID = p_header_id
AND LINE_NUMBER = l_line_number;
select decode(line.line_Number,null,null,line.line_number)||
decode(line.shipment_Number,null,null,'.'||line.shipment_number)||
decode(line.option_number,null,null,'.'||line.option_number) line_num,
line.unit_selling_price*decode(line.line_category_code,'RETURN',-1,1) unit_selling_price,
(nvl(line.ordered_quantity,line.ordered_quantity)*line.unit_selling_price)*decode(line.line_category_code,'RETURN',-1,1) extended_price,
DECODE(line.ITEM_IDENTIFIER_TYPE, 'CUST', NVL(C.CUSTOMER_ITEM_DESC,ITEMSTL.DESCRIPTION), 'INT', ITEMSTL.DESCRIPTION, null, ITEMSTL.DESCRIPTION, NVL(REF.DESCRIPTION,ITEMSTL.DESCRIPTION)) ITEM_DESCRIPTION
from oe_order_lines_all line,
mtl_system_items_tl itemstl,
mtl_customer_items c,
mtl_cross_references ref,
mtl_system_items_b_kfv items
Where line.inventory_item_id =items.inventory_item_id(+)
and line.line_id= p_line_rec.line_id
and oe_sys_parameters.value('MASTER_ORGANIZATION_ID') = items.organization_id
and items.organization_id = itemstl.organization_id
and items.inventory_item_id =itemstl.inventory_item_id
and itemstl.language = userenv('LANG')
and line.item_identifier_type = ref.cross_reference_type(+)
and line.ordered_item = ref.cross_reference(+)
and line.inventory_item_id = ref.inventory_item_id(+)
and line.ordered_item_id = c.customer_item_id(+);