The following lines contain the word 'select', 'insert', 'update' or 'delete':
CURSOR g_csr_lookup_select_sg(
c_lookup_type VARCHAR2,
c_lookup_code VARCHAR2) IS
SELECT flv.meaning
FROM fnd_lookup_values flv
WHERE flv.lookup_code = c_lookup_code
AND flv.lookup_type = c_lookup_type
AND flv.language = USERENV('LANG')
AND flv.view_application_id = 3
AND flv.security_group_id =
fnd_global.lookup_security_group(
flv.lookup_type,
flv.view_application_id);
SELECT flv.meaning
FROM fnd_lookup_values flv
WHERE flv.lookup_code = c_lookup_code
AND flv.lookup_type = c_lookup_type
AND flv.language = USERENV('LANG')
AND flv.view_application_id = 3
AND flv.security_group_id = 0;
OPEN g_csr_lookup_select_sg(p_lookup_type, p_lookup_code);
FETCH g_csr_lookup_select_sg INTO g_meaning;
IF g_csr_lookup_select_sg%NOTFOUND THEN
-- lookup type/code combo not found so check for default sec. group.
CLOSE g_csr_lookup_select_sg;
CLOSE g_csr_lookup_select_sg;
ELSIF g_csr_lookup_select_sg%ISOPEN THEN
CLOSE g_csr_lookup_select_sg;
SELECT org_info.org_information9 INTO l_legislation_code
FROM hr_organization_information org_info
WHERE org_info.org_information_context = 'Business Group Information'
AND org_info.organization_id = hr_security.get_sec_profile_bg_id;
CURSOR csr_lookup_select_sg(
c_language VARCHAR2,
c_lookup_type VARCHAR2,
c_lookup_code VARCHAR2) IS
SELECT flv.meaning
FROM fnd_lookup_values flv
WHERE flv.lookup_code = c_lookup_code
AND flv.lookup_type = c_lookup_type
AND flv.language = c_language
AND flv.view_application_id = 3
AND flv.security_group_id = 0;
OPEN csr_lookup_select_sg(p_language, p_lookup_type, p_lookup_code);
FETCH csr_lookup_select_sg INTO l_meaning;
IF csr_lookup_select_sg%NOTFOUND THEN
-- lookup language/type/code combo not found so return NULL
CLOSE csr_lookup_select_sg;
CLOSE csr_lookup_select_sg;