The following lines contain the word 'select', 'insert', 'update' or 'delete':
select bit1.time_unit_multiplier,
bit1.base_time_unit,
con1.sequence_no,
0,
con1.availability
from hr_pattern_constructions CON1,
hr_pattern_bits BIT1
where bit1.pattern_bit_id = con1.pattern_bit_id
and con1.pattern_id = p_pattern_id
union all
select bit2.time_unit_multiplier,
bit2.base_time_unit,
con2.sequence_no,
con3.sequence_no,
con3.availability
from hr_pattern_bits BIT2,
hr_pattern_constructions CON2,
hr_pattern_constructions CON3
where bit2.pattern_bit_id = con3.pattern_bit_id
and con2.component_pattern_id = con3.pattern_id
and con2.pattern_id = p_pattern_id
order by 3,4;
select pattern_start_position,
calendar_start_time,
pattern_id
from hr_calendars
where calendar_id = P_CALENDAR_ID;
select exc.pattern_id,
exc.exception_start_time
from hr_pattern_exceptions EXC,
hr_exception_usages EXC_USE
where exc.exception_start_time < p_period_end_time
and exc.exception_end_time > p_period_start_time
and exc.exception_id = exc_use.exception_id
and exc_use.calendar_id = p_calendar_id
order by exc.exception_start_time;
select exc.pattern_id,
exc.exception_start_time
from hr_pattern_exceptions EXC,
hr_exception_usages EXC_USE
where exc.exception_start_time < p_period_end_time
and exc.exception_end_time > p_period_start_time
and exc.exception_id = exc_use.exception_id
and exc_use.calendar_usage_id = p_calendar_usage_id
order by exc.exception_start_time;
select use.calendar_usage_id,
use.calendar_id,
use.start_date,
use.end_date
from hr_calendar_usages USE
where use.purpose_usage_id = p_bg_purpose_usage_id
and use.primary_key_value = p_bg_primary_key_value
and use.start_date <= p_period_to
and use.end_date >= p_period_from
UNION ALL
select use.calendar_usage_id,
use.calendar_id,
use.start_date,
use.end_date
from hr_calendar_usages USE
where use.purpose_usage_id = p_person_purpose_usage_id
and use.primary_key_value = p_person_primary_key_value
and use.start_date <= p_period_to
and use.end_date >= p_period_from
order by 3;
select use.calendar_usage_id,
use.calendar_id,
use.start_date,
use.end_date
from hr_calendar_usages USE,
hr_calendars CAL
where use.purpose_usage_id = p_purpose_usage_id
and use.primary_key_value = p_primary_key_value
and use.start_date <= p_period_to
and use.end_date >= p_period_from
and cal.calendar_id = use.calendar_id
order by use.start_date;
select purpose_usage_id
from hr_pattern_purpose_usages
where entity_name = p_entity_name
and pattern_purpose = p_pattern_purpose;