The following lines contain the word 'select', 'insert', 'update' or 'delete':
CURSOR segments(chart_of_accounts_id NUMBER) IS SELECT
application_column_name
FROM
fnd_id_flex_segments f
WHERE
f.id_flex_num = chart_of_accounts_id and
f.application_id = 101 AND
f.id_flex_code = 'GL#' AND
f.enabled_flag = 'Y'
ORDER BY f.segment_num;
SELECT chart_of_accounts_id INTO l_chart_of_accounts_id FROM gmf_legal_entities
WHERE legal_entity_id = p_legal_entity_id;
l_sql_stmt := 'SELECT ';
SELECT legal_entity_name FROM gmf_legal_entities
WHERE legal_entity_id = cp_legal_entity_id;
SELECT name FROM hr_organization_units
WHERE organization_id = cp_organization_id;
SELECT organization_code FROM mtl_parameters
WHERE organization_id = cp_org_id;
SELECT VAL.description
FROM fnd_id_flex_segments FND,
fnd_flex_values_vl VAL
WHERE FND.id_flex_num = p_chart_of_accounts_id
AND FND.segment_num = NVL(p_segment_num, FND.segment_num)
AND FND.enabled_flag = 'Y'
AND FND.flex_value_set_id = VAL.flex_value_set_id
AND VAL.enabled_flag = 'Y'
AND VAL.flex_value = NVL(p_segment_value, VAL.flex_value)
AND NVL(VAL.description,' ') = NVL(null, NVL(VAL.description,' '))
AND VAL.summary_flag = 'N'
AND fnd.id_flex_code = 'GL#';
SELECT chart_of_accounts_id INTO l_chart_of_accounts_id FROM gmf_legal_entities
WHERE legal_entity_id = p_legal_entity_id;
SELECT item_number FROM mtl_item_flexfields
WHERE inventory_item_id = cp_inventory_item_id
AND organization_id = cp_organization_id;
SELECT concatenated_segments FROM mtl_categories_kfv
WHERE category_id = cp_cost_category_id;