The following lines contain the word 'select', 'insert', 'update' or 'delete':
select a.name
from wf_roles a,
jtf_rs_salesreps b
where a.orig_system = 'PER'
and a.orig_system_id = b.person_id
and b.salesrep_id = to_number(l_salesrep)
and a.status = 'ACTIVE'
and rownum = 1;
PROCEDURE DeleteActivities( arg_plan_id in number) IS
TYPE DelExpType is REF CURSOR;
delete_activities_c DelExpType;
sql_stmt := ' SELECT item_key ' ||
' FROM wf_items' ||
' WHERE item_type = :l_item_type' ||
' AND item_key like '''|| to_char(arg_plan_id) || '-%''';
OPEN delete_activities_c for sql_stmt using l_item_type;
FETCH DELETE_ACTIVITIES_C INTO l_item_key;
EXIT WHEN DELETE_ACTIVITIES_C%NOTFOUND;
update wf_notifications
set end_date = sysdate
where group_id in
(select notification_id
from wf_item_activity_statuses
where item_type = 'MRPEXWFS'
and item_key = l_item_key
union
select notification_id
from wf_item_activity_statuses_h
where item_type = 'MRPEXWFS'
and item_key = l_item_key);
update wf_items
set end_date = sysdate
where item_type = 'MRPEXWFS'
and item_key = l_item_key;
update wf_item_activity_statuses
set end_date = sysdate
where item_type = 'MRPEXWFS'
and item_key = l_item_key;
update wf_item_activity_statuses_h
set end_date = sysdate
where item_type = 'MRPEXWFS'
and item_key = l_item_key;
CLOSE delete_activities_c;
msc_util.msc_debug('Error in delete activities:'|| to_char(sqlcode) || ':'
|| substr(sqlerrm,1,100));
END DeleteActivities;
select user_id
into p_user_id
from fnd_user
where user_name = p_planner;
SELECT APPLICATION_ID
INTO p_app_id
FROM FND_APPLICATION_VL
WHERE APPLICATION_NAME = 'Oracle Manufacturing' ;
SELECT responsibility_id
INTO p_resp_id
FROM FND_responsibility_vl
where application_Id = p_app_id
and rownum = 1;
select to_char(mrp_form_query_s.nextval)
into item_key
from dual;