The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT allow_price_override_flag
INTO l_allow_price_override_flag
FROM po_lines_all
WHERE po_line_id = p_po_line_id;
SELECT contractor_status
INTO l_contractor_status
FROM po_requisition_lines_all
WHERE requisition_line_id = p_req_line_id;
SELECT requisition_line_id
, line_num
INTO x_expense_line_id
, x_expense_line_num
FROM po_requisition_lines_all
WHERE labor_req_line_id = p_parent_line_id;
SELECT job_long_description
INTO l_job_long_description
FROM po_requisition_lines_all
WHERE requisition_line_id = p_req_line_id;
SELECT name
INTO l_job_name
FROM per_jobs_vl
WHERE job_id = p_job_id;
SELECT PRL2.requisition_line_id
, PRL2.line_num
INTO x_parent_line_id
, x_parent_line_num
FROM po_requisition_lines_all PRL1 -- Expense Line
, po_requisition_lines_all PRL2 -- Parent Line
WHERE p_expense_line_id = PRL1.requisition_line_id
AND PRL1.labor_req_line_id = PRL2.requisition_line_id;
SELECT labor_req_line_id
INTO l_labor_req_line_id
FROM po_requisition_lines_all
WHERE requisition_line_id = p_req_line_id;
SELECT order_type_lookup_code
INTO l_value_basis
FROM po_lines_all
WHERE po_line_id = p_po_line_id;
SELECT 'Y'
INTO l_valid_flag
FROM per_jobs pj,
hr_all_organization_units haou,
mtl_parameters mp
WHERE pj.job_id = p_job_id
AND mp.organization_id = p_ship_to_org_id
AND mp.organization_id = haou.organization_id
AND haou.business_group_id = pj.business_group_id;
SELECT sum(nvl(amount_received,0)),
sum(nvl(amount_billed,0))
INTO x_amount_received,
x_amount_billed
FROM po_line_locations_all
WHERE po_line_id = p_po_line_id
AND shipment_type = 'STANDARD';
SELECT count(*)
INTO l_count_services_lines
FROM po_lines_all POL,
po_distributions_all POD
WHERE POL.po_header_id = p_po_header_id
AND POL.order_type_lookup_code IN ('FIXED PRICE', 'RATE')
AND POD.po_line_id = POL.po_line_id -- Join between PO Lines and Distributions
AND POD.req_distribution_id IS NOT NULL; -- There exists a backing Req
SELECT count(*)
INTO l_count
FROM po_lines_all POL,
po_distributions_all POD
WHERE POL.po_line_id = p_po_line_id
AND POL.order_type_lookup_code = 'FIXED PRICE'
AND POL.purchase_basis = 'SERVICES'
AND POD.po_line_id = POL.po_line_id
AND POD.req_distribution_id IS NOT NULL; -- There exists a backing Req.
SELECT count(*)
INTO l_count
FROM po_line_locations_all POLL,
po_lines_all POL,
po_distributions_all POD
WHERE POLL.line_location_id = p_po_line_location_id
AND POL.po_line_id = POLL.po_line_id
AND POL.order_type_lookup_code = 'FIXED PRICE'
AND POL.purchase_basis = 'SERVICES'
AND POD.line_location_id = POLL.line_location_id
AND POD.req_distribution_id IS NOT NULL; -- There exists a backing Req.