The following lines contain the word 'select', 'insert', 'update' or 'delete':
select srp_id, name, emp_num from cn_srp_hr_data order by name;
select distinct
s.srp_id srp_id,
s.name name,
s.emp_num emp_num,
s.start_date start_date,
s.end_date end_date,
s.cost_center cost_center,
sg.group_id comp_group_id,
c.group_name comp_group_name,
j.job_id job_code,
j.name job_title,
srd.job_discretion disc_job_title,
-- sr.role_id role_id,
-- null role_name
1 role_id,
''A'' role_name
from cn_srp_hr_data s,
cn_srp_role_dtls srd,
cn_srp_roles sr,
per_jobs j,
jtf_rs_group_members sg,
jtf_rs_groups_tl c,
jtf_rs_group_usages u,
jtf_rs_role_relations rr2
where s.srp_id = sr.salesrep_id
and sr.srp_role_id = srd.srp_role_id
and srd.job_title_id = j.job_id (+)
and s.resource_id = sg.resource_id
and sg.group_id = c.group_id
and c.language = userenv(''LANG'')
and u.group_id = c.group_id
and rr2.role_resource_id = sg.group_member_id
and rr2.role_resource_type = ''RS_GROUP_MEMBER''
and rr2.role_id = sr.role_id
and rr2.delete_flag = ''N''
and sg.delete_flag = ''N''
and u.usage = ''SF_PLANNING''';
select job_code
from cn_job_titles
where job_title_id = l_job_title_id;
select s.srp_id,
s.name,
s.emp_num,
s.start_date,
s.end_date,
s.cost_center,
null comp_group_name, null comp_group_id,
null job_code, null job_title, null disc_job_title,
null role_id, null role_name --recycle rec type
from cn_srp_hr_data s
where s.srp_id = p_srp_id;
select min(p2.start_date)
from cn_period_statuses p1,
cn_period_statuses p2
where p_date between p1.start_date and p1.end_date
and p1.period_year = p2.period_year;
select manager_flag, start_date_active,
nvl(end_date_active, g_end_of_time) end_date_active
from cn_qm_mgr_srp_groups
where srp_id = p_srp_id and comp_group_id = p_comp_group_id;
select sg.role_id, sg.role_name, sg.start_date_active, sg.group_name,
nvl(sg.end_date_active, g_end_of_time) end_date_active,
sg.srp_id, sd.name srp_name, sd.emp_num, sg.manager_flag,
decode(sg.manager_flag, 'Y', sd.name || ' *', sd.name) ast_name
from cn_qm_mgr_srp_groups sg, cn_srp_hr_data sd
where sg.comp_group_id = l_comp_group_id and sg.srp_id = sd.srp_id;
select parent_comp_group_id, start_date_active,
nvl(end_date_active, g_end_of_time) end_date_active
from cn_qm_group_hier
where comp_group_id = p_comp_group_id;
-- date interval then insert into result tbl
if (l_mgr_assign_start <= l_mgr_assign_end AND
greatest(l_mgr_assign_start, l_fy_start_date) <=
least (l_mgr_assign_end, p_date)) then
-- realize that g_end_of_time is really null
if l_mgr_assign_end = g_end_of_time then
l_mgr_assign_end := null;
-- date interval then insert into result tbl
if (l_mgr_assign_start <= l_mgr_assign_end AND
greatest(l_mgr_assign_start, l_fy_start_date) <=
least (l_mgr_assign_end, p_date)) then
-- realize that g_end_of_time is really null
if l_mgr_assign_end = g_end_of_time then
l_mgr_assign_end := null;