The following lines contain the word 'select', 'insert', 'update' or 'delete':
if (l_query = 'select null Id, null Val,null Att_Name from dual Where 1 = 2' ) then
return 'Y';
l_query := 'Select Val From ('|| l_query ||' ) '|| l_Addl_where_clause;
Select txn_category_attribute_id, from_value , to_value
from pqh_fr_stat_situation_rules
where stat_situation_rule_id = p_stat_situation_rule_id;
l_query := 'Select Val From ('|| l_query ||' ) '|| l_Addl_where_clause;
Select value_style_cd, value_set_id
from pqh_txn_category_attributes
where txn_category_attribute_id = p_txn_category_attribute_id;
l_query varchar2(5000) := 'select null Id, null Val,null Att_Name from dual Where 1 = 2';
Select null
from pqh_fr_stat_situation_rules
where statutory_situation_id = p_stat_situation_id;
select business_group_id
from per_all_people_f where
person_id = p_person_id
and p_determination_date between effective_start_date and effective_end_date;
select business_group_id
from per_all_people_f where
person_id = p_person_id
and p_determination_date between effective_start_date and effective_end_date;
SELECT scl.segment10 emp_type
FROM per_all_assignments_f asg,
hr_soft_coding_keyflex scl
WHERE asg.soft_coding_keyflex_id = scl.soft_coding_keyflex_id
AND person_id = p_person_id
AND p_determination_date between effective_start_date and effective_end_date
AND primary_flag = 'Y';
select ss.situation_type, ss.situation_name, ss.situation_type_name
from PQH_FR_EMP_STAT_SITUATIONS ess, PQH_FR_STAT_SITUATIONS_V ss
where ess.Statutory_situation_id = ss.Statutory_situation_id
and ess.person_id = p_person_id
and p_determination_date between ess.actual_start_date and nvl(ess.actual_end_date, ess.provisional_end_date);
select count(1) into l_dependent_cnt
from per_contact_relationships
where person_id = p_person_id
and p_determination_date between date_start and nvl(date_end,hr_general.end_of_time);
select max(date_of_birth) into l_dependent_dob
from per_all_people_f
where person_id in (select contact_person_id
from per_contact_relationships
where person_id = p_person_id
and p_determination_date between date_start and nvl(date_end,hr_general.end_of_time));
SELECT NVL(renewable_allowed,'N'),NVL(max_no_of_renewals,0)
FROM pqh_fr_stat_situations
WHERE statutory_situation_id = p_statutory_situation_id;
SELECT NVL(actual_start_date,provisional_start_date),NVL(NVL(actual_end_date,provisional_end_date),TRUNC(SYSDATE)),NVL(approval_flag,'N')
FROM pqh_fr_emp_stat_situations
WHERE emp_stat_situation_id = p_emp_stat_situation_id;
SELECT NVL(count(emp_stat_situation_id),0)
FROM pqh_fr_emp_stat_situations
WHERE renewal_flag = 'Y'
AND renew_stat_situation_id = p_emp_stat_situation_id;
SELECT NVL(COUNT(emp_stat_situation_id),0)
FROM pqh_fr_emp_stat_situations
WHERE emp_stat_situation_id <> NVL(p_emp_stat_situation_id,-1)
AND renewal_flag = 'Y'
AND renew_stat_situation_id = p_renew_stat_situation_id;
SELECT tca.value_style_cd,
tr.from_clause,
tr.where_clause,
a.column_name,
a.column_type
FROM pqh_txn_category_attributes tca,
pqh_table_route tr,
pqh_attributes a
WHERE tca.txn_category_attribute_id = p_txn_catg_attribute_id
AND tca.attribute_id = a.attribute_id
AND a.master_table_route_id = tr.table_route_id;
l_sql_stmt := 'SELECT '||l_attr_dtls.column_name
||' FROM '|| l_attr_dtls.from_clause
||' WHERE '||l_where_clause_out;
SELECT txn_category_attribute_id,
from_value,
to_value,
exclude_flag
FROM pqh_fr_stat_situation_rules
WHERE statutory_situation_id = p_stat_sit_id
AND NVL(enabled_flag,'N') = 'Y'
AND NVL(required_flag,'N') = p_required_flag
ORDER BY processing_sequence;
SELECT statutory_situation_id
FROM pqh_fr_stat_situations_v sit
,per_shared_types_vl sh
WHERE sh.shared_type_id = type_of_ps
AND sh.system_type_cd = NVL(PQH_FR_UTILITY.get_bg_type_of_ps,sh.system_type_cd)
AND sit.business_group_id = p_business_group_id
AND sit.situation_type = p_situation_type
AND sit.sub_type = NVL(p_sub_type,sub_type)
AND sit.default_flag = 'Y'
AND TRUNC(p_eff_date) BETWEEN sit.date_from AND NVL(sit.date_to,HR_GENERAL.end_of_time);
SELECT statutory_situation_id
FROM pqh_fr_stat_situations
WHERE business_group_id = p_business_group_id
AND situation_type = p_situation_type
AND sub_type = NVL(p_sub_type,sub_type)
AND default_flag = 'Y'
AND trunc(p_eff_date) BETWEEN date_from and NVL(date_to,hr_general.end_of_time);
FUNCTION get_update_time_line_code(p_provisional_start_date IN DATE,
p_provisional_end_date IN DATE,
p_effective_date IN DATE,
p_approval_flag IN VARCHAR2,
p_renew_flag IN VARCHAR2,
p_situation_type IN VARCHAR2,
p_sub_type IN VARCHAR2,
p_default_flag IN VARCHAR2)
RETURN VARCHAR2 IS
l_return_value VARCHAR2(10) := 'NO';
END get_update_time_line_code;
FUNCTION get_delete_time_line_code(p_person_id IN NUMBER,
p_provisional_start_date IN DATE,
p_provisional_end_date IN DATE,
p_effective_date IN DATE)
RETURN VARCHAR2 IS
l_return_value VARCHAR2(10) := NULL;
SELECT DECODE(TRUNC(MAX(provisional_start_date)),TRUNC(p_provisional_start_date),'DEL-TRUE',NULL)
INTO l_return_value
FROM pqh_fr_emp_stat_situations
WHERE person_id = p_person_id
AND statutory_situation_id NOT IN (SELECT statutory_situation_id
FROM pqh_fr_stat_situations_v sit
,per_shared_types_vl sh
WHERE sh.shared_type_id = type_of_ps
AND sh.system_type_cd = NVL(PQH_FR_UTILITY.get_bg_type_of_ps,sh.system_type_cd)
AND sit.business_group_id= HR_GENERAL.get_business_group_id
AND sit.default_flag = 'Y'
AND sit.situation_type = 'IA'
AND sit.sub_type = 'IA_N'
AND TRUNC(SYSDATE) BETWEEN sit.date_from AND NVL(sit.date_to,HR_GENERAL.end_of_time));
END get_delete_time_line_code;