The following lines contain the word 'select', 'insert', 'update' or 'delete':
update igw_proposals_all set proposal_status = 'I' where proposal_id = p_proposal_id;
select x into y
from igw_prop_user_roles ppr,
igw_prop_users ppu
where ppr.proposal_id = p_proposal_id AND
ppr.proposal_id = ppu.proposal_id AND
ppr.user_id = ppu.user_id AND
ppr.role_id in (0,2) AND
ppr.user_id = p_logged_user_id AND
sysdate >= ppu.start_date_active AND
sysdate <= nvl(ppu.end_date_active, sysdate);
select count(*)
into l_count
from igw_prop_user_roles ppr,
igw_prop_users ppu
where ppr.proposal_id = p_proposal_id
and ppr.proposal_id = ppu.proposal_id
and ppr.user_id = ppu.user_id
and (ppr.role_id = 0 or ppr.role_id = 2)
and ppu.user_id = fnd_global.user_id
and sysdate >= ppu.start_date_active
and sysdate <= nvl(ppu.end_date_active,sysdate);
select ipa.proposal_status,
ipa.signing_official_id,
ipa.admin_official_id
into l_proposal_status,
l_signing_official_id,
l_admin_official_id
from igw_proposals_all ipa
where ipa.proposal_id = g_proposal_id;
select complete,
not_applicable
into l_budget_complete,
l_budget_not_applicable
from igw_prop_checklist
where document_type_code = 'BUDGETS' and
proposal_id = g_proposal_id;
/* update igw_prop_approval_runs
set status_code = 'I',
status_date = sysdate
where run_id = l_run_id;
select hou.name,
pbr.rule_name,
pbr.rule_id,
pbr.map_id,
map.description,
pbr.valid_flag
from hr_organization_units hou,
igw_org_maps_all map,
igw_business_rules_all pbr
where pbr.organization_id = l_org_id
and pbr.map_id = map.map_id(+)
and pbr.organization_id = hou.organization_id
and nvl(pbr.end_date_active,sysdate) >= sysdate
and pbr.rule_type = p_rule_type
order by pbr.rule_sequence_number;
select pom.stop_id,
pom.user_name,
fus.user_id,
pom.approver_type
from fnd_user fus,
igw_org_map_details pom
where pom.user_name = fus.user_name
and pom.map_id = l_map_id;
select nvl(max(run_number),0) + 1
from igw_prop_approval_runs
where proposal_id = g_proposal_id;
select 'x'
from igw_prop_users
where proposal_id = g_proposal_id
and user_id = l_user_id;
select 'x'
from igw_prop_user_roles
where proposal_id = g_proposal_id
and user_id = l_user_id
and role_id = l_role_id;
select lead_organization_id
into l_org_id
from igw_proposals_all
where proposal_id = g_proposal_id;
select igw_prop_approval_runs_s.nextval
into p_run_id
from dual;
insert into igw_prop_approval_runs(run_id,proposal_id,
run_number,status_code,status_date) values (
p_run_id,g_proposal_id,l_run_number,'I',sysdate);
insert into igw_prop_maps(prop_map_id,proposal_id,description,
map_type,map_sequence_number,run_id,approval_status,
last_update_date,last_updated_by,creation_date,created_by,
last_update_login)
values(
igw_prop_maps_s.nextval,g_proposal_id,l_description,
p_rule_type,l_map_seq_number,p_run_id,null,
sysdate,fnd_global.user_id,sysdate,fnd_global.user_id,
fnd_global.login_id);
insert into igw_prop_map_stops(prop_map_id,stop_id,
user_name,wf_role_name,wf_display_role_name,approver_type,
approval_status,submission_date,approval_date,comments,
last_update_date,last_updated_by,creation_date,created_by,
last_update_login)
values(
igw_prop_maps_s.currval,c1.stop_id,c1.user_name,l_wf_role_name,
l_wf_display_role_name,c1.approver_type,null,null,null,null,
sysdate,fnd_global.user_id,sysdate,fnd_global.user_id,
fnd_global.login_id);
insert into igw_prop_users(proposal_id,user_id,start_date_active,
end_date_active,
last_update_date,last_updated_by,creation_date, created_by,
last_update_login)
values(
g_proposal_id,l_user_id,sysdate,null,
sysdate,fnd_global.user_id,sysdate,fnd_global.user_id,
fnd_global.login_id);
insert into igw_prop_user_roles(proposal_id,user_id,role_id,
last_update_date,last_updated_by,creation_date, created_by,
last_update_login)
values(
g_proposal_id,l_user_id,4,
sysdate,fnd_global.user_id,sysdate,fnd_global.user_id,
fnd_global.login_id);
insert into igw_prop_user_roles(proposal_id,user_id,role_id,
last_update_date,last_updated_by,creation_date, created_by,
last_update_login)
values(
g_proposal_id,l_user_id,1,
sysdate,fnd_global.user_id,sysdate,fnd_global.user_id,
fnd_global.login_id);
l_select_stmt varchar2(2000);
select expression_type,
lbrackets,
lvalue,
operator,
rvalue,
rvalue_id,
rbrackets,
logical_operator
from igw_business_rule_lines
where rule_id = p_rule_id
order by expression_sequence_number;
l_select_stmt := 'select 1 from dual where ';
l_select_stmt := l_select_stmt||c1.lbrackets||l_execute_result||
c1.rbrackets||' '||c1.logical_operator||' ';
return execute_dynamic_sql(l_select_stmt);
select answer
from igw_prop_questions
where question_number = p_lvalue
and proposal_id = g_proposal_id;
select total_cost,
total_direct_cost,
total_indirect_cost,
cost_sharing_amount,
underrecovery_amount
from igw_budgets
where proposal_id = g_proposal_id
and final_version_flag = 'Y';
select to_char(deadline_date,'YYYYMMDD')
from igw_proposals_all
where proposal_id = g_proposal_id;
select 'x'
from igw_budget_details pbd,
igw_budget_periods pbp,
igw_budgets pbu
where pbu.proposal_id = g_proposal_id
and pbu.final_version_flag = 'Y'
and pbu.proposal_id = pbp.proposal_id
and pbu.version_id = pbp.version_id
and pbp.proposal_id = pbd.proposal_id
and pbp.version_id = pbd.version_id
and pbd.expenditure_type = p_rvalue_id
and pbd.expenditure_category_flag = exp_cat_flag;
select 'x'
from igw_proposals_all
where proposal_id = g_proposal_id
and lead_organization_id = p_rvalue_id;
select 'x'
from igw_prop_rates ppr,
igw_budgets pbu
where pbu.proposal_id = g_proposal_id
and pbu.final_version_flag = 'Y'
and pbu.proposal_id = ppr.proposal_id
and pbu.version_id = ppr.version_id
and ppr.applicable_rate <> ppr.institute_rate;
select 'x'
from igw_prop_persons
where proposal_id = g_proposal_id
and pi_flag = 'Y'
and person_id = p_rvalue_id;
select 'x'
from igw_prop_special_reviews
where proposal_id = g_proposal_id
and special_review_code = p_rvalue_id;
l_select_stmt varchar2(2000) := 'select 1 from dual where ';
l_select_stmt := l_select_stmt||l_answer||p_operator||p_rvalue_id;
return execute_dynamic_sql(l_select_stmt);
l_select_stmt := l_select_stmt||to_char(l_total_cost)||p_operator||
p_rvalue_id;
l_select_stmt := l_select_stmt||to_char(l_total_direct_cost)||
p_operator||p_rvalue_id;
l_select_stmt := l_select_stmt||to_char(l_total_indirect_cost)||
p_operator||p_rvalue_id;
l_select_stmt := l_select_stmt||to_char(l_cost_sharing_amount)||
p_operator||p_rvalue_id;
l_select_stmt := l_select_stmt||to_char(l_underrecovery_amount)||
p_operator||p_rvalue_id;
return execute_dynamic_sql(l_select_stmt);
l_select_stmt := l_select_stmt||l_deadline_date||p_operator||p_rvalue_id;
return execute_dynamic_sql(l_select_stmt);
function execute_dynamic_sql(p_select_stmt in varchar2)
return varchar2 as
l_cursor_name integer;
dbms_sql.parse(l_cursor_name,p_select_stmt,dbms_sql.v7);
select poe.organization_id_parent
from per_org_structure_elements poe
where poe.org_structure_version_id = (select apr_org_structure_version_id
from igw_implementations)
and poe.organization_id_child = l_org_id;
select user_id
from fnd_user
where employee_id = l_person_id;
select 'x'
from igw_prop_users
where proposal_id = g_proposal_id
and user_id = l_user_id;
select 'x'
from igw_prop_user_roles
where proposal_id = g_proposal_id
and user_id = l_user_id
and role_id = l_role_id;
insert into igw_prop_users(proposal_id,user_id,start_date_active,
end_date_active,last_update_date,last_updated_by,creation_date,
created_by,last_update_login)
values(
g_proposal_id,l_sign_off_user_id,sysdate,
null,sysdate,fnd_global.user_id,sysdate,
fnd_global.user_id,fnd_global.login_id);
insert into igw_prop_users(proposal_id,user_id,start_date_active,
end_date_active,last_update_date,last_updated_by,creation_date,
created_by,last_update_login)
values(
g_proposal_id,l_admin_off_user_id,sysdate,
null,sysdate,fnd_global.user_id,sysdate,
fnd_global.user_id,fnd_global.login_id);
insert into igw_prop_user_roles(proposal_id,user_id,role_id,
last_update_date,last_updated_by,creation_date, created_by,
last_update_login)
values(
g_proposal_id,l_sign_off_user_id,3,
sysdate,fnd_global.user_id,sysdate,fnd_global.user_id,
fnd_global.login_id);
insert into igw_prop_user_roles(proposal_id,user_id,role_id,
last_update_date,last_updated_by,creation_date, created_by,
last_update_login)
values(
g_proposal_id,l_admin_off_user_id,3,
sysdate,fnd_global.user_id,sysdate,fnd_global.user_id,
fnd_global.login_id);
select pms.prop_map_id,
pms.stop_id
from igw_prop_maps pm,
igw_prop_map_stops pms
where pms.prop_map_id = pm.prop_map_id
and pm.run_id = p_run_id
and pm.map_type = 'R'
group by pms.prop_map_id,pms.stop_id
having count(*) = 1;
select distinct
ppms.wf_role_name,
ppms.wf_display_role_name
from igw_prop_maps ppm,
igw_prop_map_stops ppms
where ppm.prop_map_id = ppms.prop_map_id
and ppm.run_id = to_number(p_run_id)
and wf_role_name <> user_name;
select distinct
ppms.user_name,
ppms.wf_role_name
from igw_prop_maps ppm,
igw_prop_map_stops ppms
where ppm.prop_map_id = ppms.prop_map_id
and ppm.run_id = to_number(p_run_id)
and wf_role_name <> user_name;
update igw_prop_map_stops
set wf_role_name = user_name
where prop_map_id = i.prop_map_id
and stop_id = i.stop_id;