The following lines contain the word 'select', 'insert', 'update' or 'delete':
FUNCTION check_update_permissions(
p_credit_analyst_id IN NUMBER,
p_requestor_id IN NUMBER,
p_credit_request_status IN VARCHAR2 )
RETURN VARCHAR2 IS
l_update_permissions VARCHAR2(1) :='N';
SELECT c.resource_id
FROM jtf_rs_role_relations a,
jtf_rs_roles_vl b,
jtf_rs_resource_extns c
WHERE a.role_resource_type = 'RS_INDIVIDUAL'
AND a.role_resource_id = c.resource_id
AND b.role_type_code = 'CREDIT_MGMT'
AND a.role_id = b.role_id
AND b.role_code = 'CREDIT_ANALYST'
AND c.category = 'EMPLOYEE'
AND c.source_id = l_user_employee_id
AND NVL(a.delete_flag,'N') <> 'Y';
l_update_permissions := 'Y';
l_update_permissions := 'N';
l_update_permissions := 'Y';
l_update_permissions := 'N';
l_update_permissions := 'Y';
l_update_permissions := 'N';
RETURN l_update_permissions;
l_update_permissions := 'N';
RETURN l_update_permissions;
FUNCTION check_update_permissions(
p_credit_analyst_id IN NUMBER,
p_requestor_id IN NUMBER)
RETURN VARCHAR2 IS
l_update_permissions VARCHAR2(1) :='N';
SELECT c.resource_id
FROM jtf_rs_role_relations a,
jtf_rs_roles_vl b,
jtf_rs_resource_extns c
WHERE a.role_resource_type = 'RS_INDIVIDUAL'
AND a.role_resource_id = c.resource_id
AND b.role_type_code = 'CREDIT_MGMT'
AND a.role_id = b.role_id
AND b.role_code = 'CREDIT_ANALYST'
AND c.category = 'EMPLOYEE'
AND c.source_id = l_user_employee_id
AND NVL(a.delete_flag,'N') <> 'Y';
l_update_permissions := 'Y';
l_update_permissions := 'N';
l_update_permissions := 'Y';
l_update_permissions := 'N';
RETURN l_update_permissions;
l_update_permissions := 'N';
RETURN l_update_permissions;
SELECT 'Y'
INTO l_credit_analyst
FROM jtf_rs_role_relations a,
jtf_rs_roles_vl b,
jtf_rs_resource_extns c
WHERE a.role_resource_type = 'RS_INDIVIDUAL'
AND a.role_resource_id = c.resource_id
AND a.role_id = b.role_id
AND b.role_type_code = 'CREDIT_MGMT'
AND b.role_code = 'CREDIT_ANALYST'
AND c.category = 'EMPLOYEE'
AND c.source_id = p_employee_id
AND NVl(a.delete_flag,'N') <> 'Y';
SELECT 'Y'
INTO l_credit_analyst
FROM jtf_rs_role_relations a,
jtf_rs_roles_vl b,
jtf_rs_resource_extns c
WHERE a.role_resource_type = 'RS_INDIVIDUAL'
AND a.role_resource_id = c.resource_id
AND a.role_id = b.role_id
AND b.role_type_code = 'CREDIT_MGMT'
AND b.role_code = 'CREDIT_ANALYST'
AND c.category = 'EMPLOYEE'
AND c.source_id = l_employee_id
AND NVl(a.delete_flag,'N') <> 'Y';
SELECT 'Y'
INTO l_credit_analyst
FROM jtf_rs_role_relations a,
jtf_rs_roles_vl b,
jtf_rs_resource_extns c
WHERE a.role_resource_type = 'RS_INDIVIDUAL'
AND a.role_resource_id = c.resource_id
AND a.role_id = b.role_id
AND b.role_type_code = 'CREDIT_MGMT'
AND b.role_code = 'CREDIT_ANALYST'
AND c.category = 'EMPLOYEE'
AND c.resource_id = p_resource_id;
SELECT per.FULL_NAME
FROM JTF_RS_RESOURCE_EXTNS rextns,
JTF_RS_ROLE_RELATIONS rel,
JTF_RS_ROLES_VL role_vl,
PER_ALL_PEOPLE_F per
WHERE role_vl.role_type_code = 'CREDIT_MGMT'
and role_vl.role_code = 'CREDIT_ANALYST'
and role_vl.role_id = rel.role_id
and rel.role_resource_type = 'RS_INDIVIDUAL'
and rel.delete_flag <> 'Y'
and rel.role_resource_id = rextns.resource_id
and rextns.category = 'EMPLOYEE'
and rextns.source_id = per.person_id
and sysdate between per.effective_start_date and per.effective_end_date
and per.current_employee_flag = 'Y'
and rextns.resource_id = p_resource_id;
SELECT case_folder_number
FROM AR_CMGT_CASE_FOLDERS
WHERE credit_request_id = p_credit_request_id;
SELECT cld.number_of_references
FROM ar_cmgt_check_list_dtls cld,
ar_cmgt_check_lists cl
WHERE cl.check_list_id = cld.check_list_id
AND cld.data_point_id = p_data_point_id
AND cl.credit_classification = p_credit_classification
AND cl.review_type = p_review_type
AND cl.submit_flag = 'Y'
AND sysdate between cl.start_date and nvl(cl.end_date,SYSDATE);
SELECT data_point_id,
required_flag,
number_of_references
FROM ar_cmgt_check_list_dtls
WHERE check_list_id = p_old_check_list_id;
INSERT INTO ar_cmgt_check_list_dtls
(check_list_id,
data_point_id,
number_of_references,
required_flag,
last_updated_by,
created_by,
creation_date,
last_update_date,
last_update_login )
VALUES (
p_new_check_list_id,
c_data_points_rec.data_point_id,
c_data_points_rec.number_of_references,
c_data_points_rec.required_flag,
-1,
-1,
SYSDATE,
SYSDATE,
-1);
SELECT Check_list_name
FROM ar_cmgt_check_lists
WHERE submit_flag = 'Y'
AND credit_classification = p_credit_classification
AND review_type = p_review_type
AND nvl(end_date,SYSDATE) >= p_start_date;
SELECT user_name
FROM fnd_user
WHERE user_id = p_user_id
AND sysdate between start_date and nvl(end_date,SYSDATE);
FUNCTION check_delete_permissions(p_credit_analyst_id IN NUMBER,
p_requestor_id IN NUMBER,
p_credit_request_status IN VARCHAR2 )
RETURN VARCHAR2
IS
l_del_permission varchar2(1) := 'N';
END check_delete_permissions;
SELECT c.source_id
FROM jtf_rs_resource_extns c
WHERE c.category = 'EMPLOYEE'
AND c.resource_id = l_resource_id;
SELECT credit_analyst_id
FROM ar_cmgt_case_folders
WHERE case_folder_id = l_case_folder_id;
select 'Y'
from dual
where exists (select case_folder_id
from ar_cmgt_case_folders
where party_id = p_party_id
and cust_account_id = nvl(p_cust_account_id,-99)
and site_use_id = nvl(p_cust_account_site_id,-99));
SELECT credit_request_id
INTO l_credit_request_id
FROM ar_cmgt_credit_requests
WHERE party_id = p_party_id
AND cust_account_id = p_cust_account_id
AND site_use_id = p_site_use_id
AND status <> 'PROCESSED';
SELECT SUM(score)
INTO l_score_total
FROM ar_cmgt_cf_dtls
WHERE case_folder_id=p_case_folder_id;
'SELECT credit_classification ' ||
'FROM hz_customer_profiles ' ||
'WHERE party_id = :1 ' ||
'AND cust_account_id = :2 ' ||
'AND site_use_id = :3 ';
'SELECT credit_classification ' ||
'FROM hz_customer_profiles ' ||
'WHERE party_id = :1 ' ||
'AND cust_account_id = :2 ' ||
'AND site_use_id IS NULL ';
'SELECT credit_classification ' ||
'FROM hz_customer_profiles ' ||
'WHERE party_id = :1 ' ||
'AND cust_account_id = -1 ' ||
'AND site_use_id IS NULL ';
SELECT default_credit_classification
INTO l_credit_classification
FROM ar_cmgt_setup_options;
select notification_id
INTO l_notification_id
from wf_notifications
where message_name = p_message_name --'MSG_TO_CM_NO_CA'
and Recipient_role = p_recipient_role --'FND_RESP222:23918'
and status = 'OPEN'
and context like 'ARCMGTAP:'||p_credit_request_id||'%';
SELECT decode( derive_type,
'EURO', 'EURO',
'EMU', decode( sign( trunc(sysdate) -
trunc(derive_effective)),
-1, 'OTHER',
'EMU'),
'OTHER' )
INTO l_type
FROM FND_CURRENCIES
WHERE currency_code = p_to_currency;
SELECT default_credit_classification ,
default_exchange_rate_type,
aging_bucket_id,
match_rule_id,
cer_dso_days,
period,
auto_application_num_flag
INTO l_default_credit_classif ,
l_default_exchange_type,
l_aging_bucket_id,
l_match_rule_id,
l_cer_dso_days,
l_period,
l_auto_application_num_flag
FROM ar_cmgt_setup_options;
SELECT CUST_ACCOUNT_ID
FROM HZ_CUST_ACCOUNTS
WHERE PARTY_ID = p_party_id
AND STATUS = 'A';
SELECT CUST_ACCOUNT_ID
FROM HZ_CUST_ACCOUNTS
WHERE PARTY_ID = p_party_id
AND STATUS = 'A';
SELECT FULL_NAME
FROM PER_ALL_PEOPLE_F
WHERE sysdate between effective_start_date and effective_end_date
and person_id = p_requestor_id;