The following lines contain the word 'select', 'insert', 'update' or 'delete':
select p.party_name
, o.name
from cs_incidents_all_b i
, hz_parties p
, okc_k_lines_tl o
where i.incident_id = b_incident_id
and i.customer_id = p.party_id(+)
and i.contract_service_id = o.id(+)
and o.language(+) = userenv('lang');
select null tmp
from jtf_notes_b
where source_object_code = b_type
and source_object_id = b_id;
Select task_type_id,tt.name
from jtf_Task_types_tl tt
where task_type_id in (20,21)
and language=userenv('LANG');
SELECT 'Y'
FROM jtf_task_depends
WHERE p_task_id in (task_id,dependent_on_task_id);
SELECT resource_name
, resource_id
, resource_type
FROM csf_selected_resources_v
ORDER BY upper(resource_name);
SELECT /*+ leading(res) use_nl(res a) cardinality(res 5) */
t.task_id
, decode(t.task_type_id, 20, 0, 21, 0, t.task_id) real_task_id
, t.task_number
, t.task_type_id
, decode(t.task_type_id, 20, 0, 21, 2, 1) trip_task_ind
, t.task_priority_id
, t.source_object_type_code
, t.source_object_name
, t.source_object_id
, t.planned_start_date
, t.planned_end_date
, t.scheduled_start_date
, t.scheduled_end_date
, t.task_confirmation_status
, t.parent_task_id
, t.task_split_flag
, a.assignment_status_id
, a.actual_start_date
, a.actual_end_date
, l.city
, NULL customer
, NULL contract
, null type_name
, ts1.name
, 0 escalated
, a.actual_effort
, t.planned_effort
, res.resource_id
, res.resource_type
, res.resource_name
, ts1.schedulable_flag
, tt.schedule_flag
, a.object_capacity_id
FROM ( SELECT resource_id,
resource_type,
resource_name
FROM Table(Cast(v_restab As csf_resource_tbl))
) res
, jtf_task_assignments a
, jtf_tasks_b t
, jtf_task_statuses_vl ts1
, jtf_task_statuses_b ts2
, jtf_task_types_b tt
, hz_locations l
WHERE a.assignee_role = 'ASSIGNEE'
AND a.resource_id = res.resource_id
AND a.resource_type_code = res.resource_type
AND a.booking_end_date >= p_start_date
AND a.booking_start_date < p_end_date
AND a.booking_end_date >= a.booking_start_date
AND a.assignment_status_id = ts1.task_status_id
AND nvl(ts1.cancelled_flag,'N') <> 'Y'
AND t.task_id = a.task_id
-- AND t.scheduled_start_date is not null --commented for the bug 6729435
-- AND t.scheduled_end_date is not null
AND NVL(t.deleted_flag, 'N') <> 'Y'
AND t.task_status_id = ts2.task_status_id
AND nvl(ts2.cancelled_flag,'N') <> 'Y'
AND t.task_type_id = tt.task_type_id
AND l.location_id(+) = csf_tasks_pub.get_task_location_id(t.task_id,t.address_id,t.location_id)
ORDER BY res.resource_name
, nvl(a.actual_start_date,t.scheduled_start_date)
, DECODE(t.task_type_id, 20, 1, 21, 3, 2)
, a.task_assignment_id;
select background_col_rgb
into p_item
from jtf_task_custom_colors
where rule_id=l_rule_id;
SELECT object_capacity_id,status
FROM cac_sr_object_capacity
WHERE object_capacity_id in (select DISTINCT column_value
FROM TABLE(CAST(trip_id AS jtf_NUMBER_table))
where column_value <> 0);
SELECT task_id
, NVL(accesshour_required, 'N') access_flag
, NVL(after_hours_flag, 'N') after_flag
FROM csf_access_hours_b
WHERE task_id in (select DISTINCT column_value
FROM TABLE(CAST(real_task_id AS jtf_NUMBER_table))
where column_value <> 0);
SELECT task_id
FROM csp_requirement_headers
WHERE task_id in (select DISTINCT column_value
FROM TABLE(CAST(real_task_id AS jtf_NUMBER_table))
where column_value <> 0);