The following lines contain the word 'select', 'insert', 'update' or 'delete':
select displayed_field
into l_sort
from po_lookup_codes
where lookup_code = P_orderby
and lookup_type = 'SRS ORDER BY';
select description
into l_message1
from po_lookup_codes
where lookup_type = 'SRW MESSAGE'
and lookup_code = 'CANNOT RUN PROGRAM' ;
select description
into l_message1
from po_lookup_codes
where lookup_type = 'SRW MESSAGE'
and lookup_code = 'FAILURE TO GET STATUS' ;
select round(sum(oel.shipped_quantity),P_qty_precision) Quantity_Shipped
, round((nvl(sum(oel.shipped_quantity),0)
- nvl(Quantity_delivered,0)),P_qty_precision) Quantity_Variance
, sum(nvl(oel.unit_selling_price,0) * nvl(oel.shipped_quantity,0)) -
(nvl(unit_price,0) * nvl(Quantity_delivered,0)) Cost_Variance
into C_Quantity_Shipped,
C_Quantity_Variance,
C_Cost_Variance
from oe_order_lines_all oel,
oe_order_headers_all oeh
where oel.orig_sys_line_ref = to_char(Line)
AND oeh.orig_sys_document_ref = Req_number
AND oeh.order_source_id = p_Order_Source_id
AND oel.header_id = oeh.header_id
AND oel.shipped_quantity is not null
group by oeh.orig_sys_document_ref,oel.orig_sys_line_ref;
select sum(oel.shipped_quantity)
into sum_shipped_quantity
from oe_order_lines_all oel,
oe_order_headers_all oeh
where oel.orig_sys_line_ref = orig_line_num
AND oeh.orig_sys_document_ref = orig_header_num
AND oeh.order_source_id = psp_order_source_id
AND oel.header_id = oeh.header_id
AND oel.shipped_quantity is not null;
SELECT psp.manual_req_num_type manual_req_num_type
into P_req_num_type
FROM po_system_parameters psp;