The following lines contain the word 'select', 'insert', 'update' or 'delete':
select task_assignment_id
, scheduled_end_date
from jtf_agenda_ta_v
where resource_id = p_res_id
and resource_type_code = p_res_type
and shift_start = p_shift_start
and shift_end = p_shift_end
and ( task_type_id = 20 -- departure task
or ( task_type_id not in (20,21) -- real tasks
and ( scheduled_start_date < p_sched_start
or ( scheduled_start_date = p_sched_start
and task_assignment_id < p_ta_id ) ) ) )
order by decode(task_type_id,20,1,0) -- departure task last
, scheduled_start_date desc
, task_assignment_id desc;
select task_assignment_id
, scheduled_end_date
from jtf_agenda_ta_v
where resource_id = p_res_id
and resource_type_code = p_res_type
and shift_start = p_shift_start
and shift_end = p_shift_end
and task_type_id <> 21 -- not arrival task
order by decode(task_type_id,20,1,0) -- departure task last
, scheduled_start_date desc
, task_assignment_id desc;
select scheduled_start_date
, scheduled_end_date
, actual_start_date
, actual_end_date
, sched_travel_duration
, resource_id
, resource_type_code
, shift_start
, shift_end
, bound_mode_code
, planned_start_date
, planned_end_date
, task_type_id
from jtf_agenda_ta_v
where task_assignment_id = p_ta_id;
select scheduled_start_date
, resource_id
, resource_type_code
, shift_start
, shift_end
from jtf_agenda_ta_v
where task_assignment_id = p_ta_id
and actual_start_date is null
and actual_end_date is null;
select 'Y'
from jtf_agenda_ta_v
where resource_id = p_res_id
and resource_type_code = p_res_type
and shift_start = p_shift_start
and shift_end = p_shift_end
and ( scheduled_start_date > p_sched_start
or ( scheduled_start_date = p_sched_start
and task_assignment_id > p_ta_id ) )
and nvl(actual_start_date,actual_end_date) is not null;
select ''
from jtf_agenda_v
where resource_id = p_res_id
and resource_type_code = p_res_type
and p_date between shift_start and shift_end
and escalation_flag = 'Y';
select max(predicted_end_date)
, max(shift_end)
from jtf_agenda_v
where resource_id = p_res_id
and resource_type_code = p_res_type
and p_date between shift_start and shift_end
and task_type_id not in (20,21);
select assignment_status_id
from jtf_agenda_ta_v
where resource_id = p_resource_id
and resource_type_code = p_resource_type_code
and task_type_id not in (20,21)
and ( actual_start_date =
( select max( actual_start_date )
from jtf_agenda_ta_v
where resource_id = p_resource_id
and resource_type_code = p_resource_type_code
and task_type_id not in (20,21) )
or actual_start_date is null )
order by scheduled_start_date
, task_assignment_id;
select name
from jtf_task_statuses_vl
where task_status_id = p_status_id;
select task_id
from jtf_agenda_ta_v
where resource_id = p_resource_id
and resource_type_code = p_resource_type_code
and task_type_id not in (20,21)
and ( actual_start_date =
( select max( actual_start_date )
from jtf_agenda_ta_v
where resource_id = p_resource_id
and resource_type_code = p_resource_type_code
and task_type_id not in (20,21) )
or actual_start_date is null )
order by scheduled_start_date
, task_assignment_id;
SELECT begin_time
FROM jtf_cal_shift_constructs
WHERE shift_construct_id = p_shift_construct_id;
SELECT end_time
FROM jtf_cal_shift_constructs
WHERE shift_construct_id = p_shift_construct_id;
SELECT NULL
FROM jtf_tasks_b t,
jtf_task_references_vl r,
jtf_ec_statuses_vl s
WHERE t.task_id = r.task_id
AND t.task_type_id = 22
AND t.task_status_id = s.task_status_id
AND (s.closed_flag = 'N'
OR s.closed_flag is null)
AND (s.completed_flag = 'N'
OR s.completed_flag is null)
AND (s.cancelled_flag = 'N'
OR s.cancelled_flag is null)
AND r.reference_code = 'ESC'
AND r.object_type_code = l_object_type_code
AND r.object_id = l_object_id;
SELECT t.source_object_type_code,
t.source_object_id
FROM jtf_tasks_b t,
jtf_task_statuses_vl s
WHERE t.task_id = p_task_id
AND t.task_status_id = s.task_status_id
AND (s.closed_flag = 'N'
OR s.closed_flag is null)
AND (s.completed_flag = 'N'
OR s.completed_flag is null)
AND (s.cancelled_flag = 'N'
OR s.cancelled_flag is null);