The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT
new_due_date new_date,
inventory_item_id item_id,
organization_id org_id,
sum(quantity_rate) new_quantity
from msc_vertical_plan_v plan
where plan.inventory_item_id = arg_item_id
and plan.organization_id = arg_org_id
and plan.plan_id = arg_plan_id
and plan.sr_instance_id = arg_instance_id
-- and plan.new_due_date < arg_cutoff_date
GROUP BY
new_due_date,
organization_id,
inventory_item_id
ORDER BY
1, 2, 3;
SELECT to_char(mpsd.calendar_date,'DD-MM-RR'),
mpsd.calendar_date
FROM msc_trading_partners tp,
msc_calendar_dates mpsd,
msc_plans mp
WHERE mpsd.calendar_code = tp.calendar_code
and mpsd.sr_instance_id = tp.sr_instance_id
and mpsd.exception_set_id = tp.calendar_exception_set_id
and mpsd.seq_num is not null
and tp.sr_instance_id = arg_instance_id
and tp.sr_tp_id = arg_org_id
and tp.partner_type =3
and mp.plan_id = arg_plan_id
and mpsd.calendar_date between mp.data_start_date
and mp.cutoff_date
-- and rownum <30
order by mpsd.calendar_date;
SELECT to_char(mpsd.week_start_date,'DD-MM-RR'), mpsd.week_start_date
FROM msc_trading_partners tp,
msc_cal_week_start_dates mpsd,
msc_plans mp
WHERE mpsd.calendar_code = tp.calendar_code
and mpsd.sr_instance_id = tp.sr_instance_id
and mpsd.exception_set_id = tp.calendar_exception_set_id
and tp.sr_instance_id = nvl(arg_instance_id, tp.sr_instance_id)
and tp.sr_tp_id = arg_org_id
and tp.partner_type =3
and mp.plan_id = arg_plan_id
and (mpsd.week_start_date between mp.data_start_date
and mp.cutoff_date
or mpsd.next_date between mp.data_start_date and
mp.cutoff_date)
order by mpsd.week_start_date;
SELECT mpsd.period_name, mpsd.period_start_date
FROM msc_trading_partners tp,
msc_period_start_dates mpsd,
msc_plans mp
WHERE mpsd.calendar_code = tp.calendar_code
and mpsd.sr_instance_id = tp.sr_instance_id
and mpsd.exception_set_id = tp.calendar_exception_set_id
and tp.sr_instance_id = nvl(arg_instance_id, tp.sr_instance_id)
and tp.sr_tp_id = arg_org_id
and tp.partner_type =3
and mp.plan_id = arg_plan_id
and (mpsd.period_start_date between mp.data_start_date
and mp.cutoff_date
or mpsd.next_date between mp.data_start_date and
mp.cutoff_date)
order by mpsd.period_start_date;
insert into msc_form_query (query_id, number1,
last_update_date, last_updated_by,
creation_date, created_by, last_update_login)
values (p_sd_table.p_query_id(j),
p_sd_table.p_number_1(j),
sysdate,-1,
sysdate,-1,-1);