The following lines contain the word 'select', 'insert', 'update' or 'delete':
procedure delete_duplicates(retcode out nocopy number)
as
cursor get_instances is
select instance_id
from msc_apps_instances
order by instance_id;
l_stmt := 'delete from msd_dem_items_gtt ' ||
' where (inventory_item_id, sr_demand_class_pk) in ' ||
' (select sr_inventory_item_id, sr_demand_class_pk ' ||
' from msd_dem_items_gtt ' ||
' group by sr_inventory_item_id, sr_demand_class_pk ' ||
' having count(*) > 1) ' ||
' and sr_instance_id > :1';
select plan_type
from msc_plans
where plan_id = p_plan_id;
delete_duplicates(retcode);
msd_dem_common_utilities.log_debug('Insert statement for populating temporary table for ' ||
v_collect_level_type || fnd_global.local_chr(10) || l_stmt || fnd_global.local_chr(10) ||
'Instance: ' || p_instance_id || fnd_global.local_chr(10));
select instance_id
from msc_apps_instances;
msd_dem_common_utilities.log_debug('Insert statement for populating Demantra staging table for ' || v_collect_level_type || fnd_global.local_chr(10) || l_stmt || fnd_global.local_chr(10));
SELECT 1
FROM dual
WHERE EXISTS (SELECT 1
FROM msd_dem_new_items
WHERE sr_instance_id = p_sr_instance_id
AND process_flag = 2);
UPDATE msd_dem_new_items
SET process_flag = 1
WHERE sr_instance_id = p_sr_instance_id
AND process_flag = 2;
select decode(p_collect_level_type, 1 , 'Locations', 2, 'Items') into v_collect_level_type from dual;