The following lines contain the word 'select', 'insert', 'update' or 'delete':
select exception_type, count(*) exc_count
from msc_exception_details_v
where plan_id = p_plan_id
and nvl(category_set_id, p_cat_set_id) = p_cat_set_id
and exception_type in (87, 36, 37, 90, 6, 7)
group by exception_type;
select count(*) rel_count
from msc_orders_v
where plan_id = p_plan_id
and source_table = 'MSC_SUPPLIES'
and order_type = 3
and nvl(release_status,2) = 2
and nvl(category_set_id, p_cat_set_id) = p_cat_set_id
and new_order_date <= (select p.plan_start_date + p_recom_days
from msc_plans p
where p.plan_id = p_plan_id );
select round(sum(total_supply_count),p_round_val),
round(sum(late_supply_count),p_round_val),
round(avg(total_days_late),p_round_val)
from msc_bis_plan_summary_kpi
where plan_id = p_plan_id;
select count(*)
from msc_exception_details_v
where plan_id = p_plan_id
and exception_type = 10
and nvl(category_set_id, p_cat_set_id) = p_cat_set_id;
select to_date(key_date,'J') detail_date,
round(nvl(total_supply_count,0), p_round_val) total_supply_count,
round(nvl(late_supply_count,0), p_round_val) late_supply_count,
round(nvl(total_days_late,0), p_round_val) total_days_late
from msc_bis_plan_summary_kpi
where plan_id = p_plan_id
order by to_date(key_date,'J');
oneBigRecord.delete;
p_name_data.delete;
select mbrs.resource_date detail_date,
round(avg(nvl(mbrs.utilization,0)),p_round_val) run_util,
round(avg(nvl(mbrs.utilization,0)),p_round_val) setup_util -- pabram..need to change later
from msc_bis_res_summary mbrs,
msc_department_resources mdr
where mbrs.plan_id = mdr.plan_id
and mbrs.sr_instance_id = mdr.sr_instance_id
and mbrs.organization_id = mdr.organization_id
and mbrs.department_id = mdr.department_id
and mbrs.resource_id = mdr.resource_id
and mbrs.plan_id = p_plan_id
group by mbrs.resource_date
order by resource_date;
oneBigRecord.delete;
p_name_data.delete;
select round(avg(nvl(mbrs.utilization,0)),p_round_val) actual_util,
round(avg(nvl(mbrs.utilization,0)),p_round_val) setup_util -- pabram..need to change later
from msc_bis_res_summary mbrs,
msc_department_resources mdr
where mbrs.plan_id = mdr.plan_id
and mbrs.sr_instance_id = mdr.sr_instance_id
and mbrs.organization_id = mdr.organization_id
and mbrs.department_id = mdr.department_id
and mbrs.resource_id = mdr.resource_id
and mbrs.plan_id = p_plan_id
and ( ( p_resource_basis = 1 )
or ( p_resource_basis = 2 and bottleneck_flag = 1));