The following lines contain the word 'select', 'insert', 'update' or 'delete':
select tbb.time_building_block_id
from hxc_time_building_blocks tbb
where scope ='TIMECARD'
and data_set_id is null
and stop_time between p_start_date and p_stop_date
and not exists (
select 1 from hxc_tc_ap_links tap, hxc_app_period_summary apbb
where tap.timecard_id = tbb.time_building_block_id
and apbb.application_period_id = tap.application_period_id
and (apbb.start_time < p_start_date or
apbb.stop_time > p_stop_date)
)
and rownum <= nvl(fnd_profile.value('HXC_ARCHIVE_RESTORE_CHUNK_SIZE'),100);
select distinct ta.TIME_ATTRIBUTE_ID
from hxc_time_attributes ta, hxc_time_attribute_usages tau
where ta.time_attribute_id = tau.time_attribute_id
and tau.data_set_id = p_data_set_id
and ta.consolidated_flag = 'Y'
and ta.data_set_id is null;
l_sql:= 'select '||p_first_column||','||p_second_column||
' from '||p_table_name||
' where data_set_id= '||p_data_set_id||
' and rownum<100 ';