The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT 'Y' into l_flag from hr_lookups
where lookup_type = '1099R_US_COMBINED_FILER_STATES'
and lookup_code = p_state;
SELECT MEANING into l_code from hr_lookups
where lookup_type = '1099R_US_COMBINED_FILER_STATES'
and lookup_code = p_state;
SELECT fdi.user_entity_id
FROM ff_database_items fdi,
ff_user_entities fue
WHERE fue.legislation_code = 'US'
AND fue.user_entity_id = fdi.user_entity_id
AND fdi.user_name = c_user_name;
SELECT target.value
FROM ff_archive_item_contexts con2,
ff_contexts fc2,
ff_archive_items target
WHERE target.user_entity_id = c_user_entity_id
AND target.context1 = to_char(c_assignment_action_id)
/* context assignment action id */
AND fc2.context_name = 'TAX_UNIT_ID'
and con2.archive_item_id = target.archive_item_id
and con2.context_id = fc2.context_id
and ltrim(rtrim(con2.context)) = to_char(c_tax_unit_id);
SELECT target.value
FROM
ff_archive_items target
WHERE target.user_entity_id = c_user_entity_id
AND target.context1 = to_char(c_assignment_action_id);
select nvl(sum(target.value),0)
from
ff_archive_item_contexts con3,
ff_archive_item_contexts con2,
ff_contexts fc3,
ff_contexts fc2,
ff_archive_items target,
ff_database_items fdi
where fdi.user_name = 'A_CITY_WITHHELD_PER_JD_GRE_YTD'
and target.user_entity_id = fdi.user_entity_id
and target.context1 = to_char(c_assignment_action_id)
/* context assignment action id */
and fc2.context_name = 'TAX_UNIT_ID'
and con2.archive_item_id = target.archive_item_id
and con2.context_id = fc2.context_id
and ltrim(rtrim(con2.context)) = to_char(c_tax_unit_id)
/* 2nd context of tax_unit_id */
and fc3.context_name = 'JURISDICTION_CODE'
and con3.archive_item_id = target.archive_item_id
and con3.context_id = fc3.context_id
and ltrim(rtrim(con3.context)) in
( '33-005-2010', '33-047-2010',
'33-061-2010' ,'33-081-2010' ,
'33-085-2010', '33-119-3230');
SELECT count(paa.assignment_Action_id)
FROM pay_assignment_actions paa
WHERE paa.payroll_action_id = to_number(pact_id);